« first day (261 days earlier)      last day (49 days later) » 

12:03 AM
0
Q: Show specific category in database

DrJan-ItorI have two tables in my database. One named jokes and the other named category. This is the PHP which displays each joke with a category name. <?php include 'database.php'; $pdo = Database::connect(); $sql = 'SELECT jokes.*, category.name FROM jokes jokes LEFT JOIN category category ON category...

-7
Q: What is this " :: " in Laravel PHP Framework

Gent NukaWhat mean this in Laravel "::", for example: ClassName::View If someone from you know please tell me. Thanks.

0
Q: Connection refused error in PHP

chargers2143 [06-Nov-2013 17:57:32] PHP Warning: socket_connect() [function.socket-connect]: unable to connect [111]: Connection refused in /home2/whoop/public_html/phptesting/main.php on line 43 I keep getting this error. This is a snippet of code in my main.php <?php $host = '76.72.172.166'; $po...

0
Q: Creating a JSON string from MYSQL datbases

user2962766I am trying to get data from mysql database in form of a json string. I read this answer : JSON encode MySQL results But this is limited to a single table. What if I want to get data from multiple tables (name from userDetails, purchase data from UserPurchases etc). How can I create a custom st...

0
Q: Field id from field with error from form_validation?

user2912912I was searching throughout the internet but couldn't find an answer to my problem. I am using the codeigniter form_validation helper. I want to tell the user in which input field he made an error by coloring that input field for example red. Here is an example how I do input fields echo fo...

 
12:33 AM
0
Q: PHP data not Inserting into MySQL

BobI'm having issues entering data from a php form on my local host into MySQL. I will post the code below. $zip = $_POST['zip']; $city = $_POST['city']; $sql = "INSERT INTO zipcodes (zip, city) VALUES ('$zip', '$city')"; if (mysqli_query($con,$sql)) { echo "Order Details DB Updated successfully"...

 
12:45 AM
0
Q: Ubuntu Root Folder Hundreds of PHP Files

M CharlesI have an Ubuntu server that I just noticed has hundreds of files ending in .php.1 thru .php.1xxxx. I've been having timeout issues even though my max_execution_time is set to 0. Puzzled on this and wondering if this is causing my timeouts. Am I ok to wipe that folder of those files?

0
Q: jquery tokeninput can not call method 'replace' of undefined

Stanislas PiotrowskiI've seen than many users seems to meet the same problem but I've checked all causes possible to that and I did not find the issue to mine, I do not know the cause. the problem is that when I type some name into the box it retur to me that error jquery tokeninput can not call method 'replace' o...

0
Q: How do I copy files from my dropbox to my site preferably using php

user2962835How do I copy files from my Dropbox to my site preferably using php. The files in question are mp4's each about a gigabit in size that would be uploaded daily. I would further more prefer not to have the files in a public folder of Dropbox.

0
Q: I'm trying to style a data website but I'm not sure how to do it

user2962248On the website, I'm displaying restaurant food health inspection scores, and I got all of that down, but now I'm trying to style the page and add a google map for each restaurant. In my SQL data base I have the latitude & longitude data for each restaurant but I don't know how to add it in my cod...

 
12:57 AM
0
Q: Error handler for PHP uploading forces user to upload file

Jben KayeHi i have a program that allows user to upload a jpeg. and then do something about the file. my problem is that when there is no file upload, it displays an error handler and tells the user to upload a file. i dont want it to be like that. what i what to do is for the process to continue even the...

0
Q: PHP: MySQL: Update is Updating More than One Row

bloodstorm17So I am trying to update update my 2 tables: Invoice and Order_Table. I want it to update the new quantity and the new price in each table but only for the specific OrderID. I came up with this: $UpdateQuant = "UPDATE Order_Table SET Quantity = '$NewQuant' WHERE OrderID = '$OrderID' "; $UpdateQu...

0
Q: Installing Stof Doctrine Extension yields error

Tim StephensI'm trying to install Stof Doctrine Extensions for Timestampable (and eventually Loggable). Composer.json: ... "require": { "symfony/symfony": "~2.3", ... "doctrine/common": "~2.4", ... "stof/doctrine-extensions-bundle": "~1.1", ......

0
Q: trim(str_replace) - can't understand why this is not working

PatrickI'm using codeigniter's Word_limiter function to get the initial few words of a string, and then another function to echo the rest of the string if needed. However, I can't understand why this code won't work: $full_text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec aliquam, ...

0
Q: Jquery drag drop form hidden value inserting into php mysql

user2962864I'm trying to create a form from the following code, but not having any success. I want to input hidden fields to capture a value of 1 when I put one of the draggable items into the "Most Like Me" field, a value of 2 when the draggable item is in the "2nd Most Like Me", 3 for "3rd Most Like Me", ...

0
Q: How to capture text between two markers? regex php

KakitoriI want to capture text between <a href="/tag/example1" class="exa-1">example1</a> HTML <div class="tags"> <a href="tag/hourse">hourse</a> <a href="tag/pik">pik</a> <a href="tag/turtle">turtle</a> <a href="tag/pillot">pillot</a> <a href="tag/glass">glass</a> <a href="tag/dog">dog</a>...

0
Q: Resize image before using in imagecopymerge

Jben KayeI have a prorgam that uses imagecopymerge. here, i'm using two images. first image for background and second one to be placed inside it. i am able to do so, but now i want the second image to be on a certain size. this image is uploaded by user and saved at my server so i dont have control on it'...

 
1:33 AM
-1
Q: Hosting website

user1830213I am about to host a website on Oxito but the connection between PHP Website and Database sucks ! What's wrong with that ??? is there any one that already tried this ??? #hosting #website #wordpress #oxito ; Cause of this : http://ponaekolo.net/ ; it can't connect to database I don't know...

0
Q: Having one where clause in codeigniter

Jess McKenzieI have the following code below that generates this error: `You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `post_type` = 'page' AND `post_type` = 'is_external_url = 0' AND `post_t' at line 2 SELECT * W...

0
Q: Writing logs to a text file doesn't work

chipperyman573I have this code in /var/www/index.php: <html> <head> <title>Chipperyman573</title> <link rel="shortcut icon" href="/fav.ico" /> </head> <body> I honestly don't know what you expected. </body> </html> <?php //get visitors ip address $ipaddress = $REMOTE_ADDR; //get visit date $vdate = date("m-d...

0
Q: Sort array based on value

MikeI have an array like: Array ( [0] => stdClass Object ( [id] => 1 [entry] => initial entry 1 [created] => 2013-04-19 [year] => 2013 [month] => 4 [day] => 19 ) [1] => stdClass Object ( ...

0
Q: ASCII Number to Character Error in PHP

Oki Erie RinaldiI have a problem when I convert ASCII number to character. I use chr() function to convert it to character. I didn't find any errors in a pure PHP page. But, when I use chr() function in a web page (using Codeigniter framework) that contains jquery and other javascript, chr() function would retur...

0
Q: Use imagick with S3 AWS

aldanuxThese are my first steps with AWS S3, so and my goal is to use imagick for manipulating the image before I upload to S3 AWS. I use this function for resize and scale the image (works perfect on output browser): function resizeImg($img, $width, $height) { $i = new Imagick($img); $gig =...

1
Q: PHP MySQL Error column name does not exist in 'field list'

Mtn_Wolf$select = rtrim(trim('SELECT'. (isset($_REQUEST['lName']) ? ' lName,' : ''). (isset($_REQUEST['fName']) ? ' fName,' : ''). (isset($_REQUEST['address']) ? ' address,' : ''). (isset($_REQUEST['email']) ? ' email,' : ''). ...

0
Q: Slectively print a multidimensional array

user2938984I have a PHP multidimensional array that I need to selectively print to excel writer. I have something like this: array(2) { [10227]=> array(9) { ["user"]=> string(5) "10227" ["talk_time"]=> string(1) "8" ["acw"]=> string(1) "0" ["idle"]=> string(1) "6" } ...

0
Q: Select multiples counts

MourinhaMy select: SELECT DISTINCT (SELECT COUNT(*) FROM t_table WHERE year(date) BETWEEN '2013' AND '2013' AND month(date) BETWEEN '1' AND '12' AND date!=cad_em) as total1, (SELECT COUNT(*) FROM t_table WHERE year(date) BETWEEN '2013' AND '2013' AND month(date) BETWEEN '...

0
Q: Comparing array against an array group

Jack SniperI'm trying to compare one array, against another array. $dropship_array = array(); $dropship_query = tep_db_query("select id, email from drop_shippers"); while ($dropship = tep_db_fetch_array($dropship_query)) { $dropship_array[] = array('id' => $dropship['id'], ...

0
Q: Require a login when move to other project

Aldi UnantoI have two PHP projects with CI, and I open of both in the same browser. *Lets assume project 1 is A and project 2 is B What I do : Open and Login on A Open and view data(just listing data here, no login) I use and active in B, I don't know the problem, but when I move to A, I need to login ...

0
Q: how to prevent resubmitting after click f5

user2962903how to prevent resubmitting after click f5 i want after uploaded prevent f5 php i try header(); and include ''; but not working! any solution? my form <form id="pic-form" enctype="multipart/form-data" action="pic.php" method="POST"> <input name="uploadedfile" id="pic-upload" type="file"/> <...

0
Q: Validation for username and password before storing in database

user2954995I'm writing a wordpress plugin that requires the user to store thier username and password from an outside source, and as such have no way of knowing possible formats for these. I know I need to validate data before inputting to the database, but I don't know how to validate something that needs...

0
Q: Having some trouble php connection string to a mssql server

Hezinei been working game that use mssql but i have been having trouble with the connection as it keep coming back as undefined. i don't kno much about php and firend help me setup the server. it's apache2.2 $serveruser ="user"; $serverPass = "pass"; $server = "server"; $con = mssql_connect($server,...

0
Q: any may to select all the data set from php

子維 宋Is there any way to select all the data from php. I got different USERID and GPID, is there any way to show all the data from GPID when I select different user. Because each user have different GPID so I can't type all the GPID in the php $.ajax({ dataType: "json", url: http://xxx.xxx.xxx.xxx/p...

0
Q: Specific multi-dimentional array sorting in PHP

but2002I have an array of players, which are arrays themselves and I want to sort by score. [player_info] => Array ( [0] => Array ( [player_] => âlêj!!tâ~ôk [score_] => 66 [ping_] => [team_] => Blue ) [1] => Array ( ...

0
Q: How do I echo submitted values from settings.php to mainpage.php?

user2896254I'm basically trying to get the values submitted from settings so that when the user submits it, it is displayed onto mainpage.php. Here's the code from what I have in settings.php... <html> <head><title></title></head> <body> <a href="logout.php">Logout</a> <a href="mainpage.php">Main Page</a> <...

0
Q: How to foreach Key -> Value - PHP?

CyborgI have a array named $matches below you can see a Result of print_r(array_filter($matches)); Array ( [0] => Array ( [0] => Age: [1] => 22 Years [2] => Ethnicity: [3] => Caucasian [4] => Location: [5] => London, United Kingdom and Result of var_dump($matches); a...

0
Q: PHP link written into page not being retrieved by a JAVASCRIPT function

user2962306I'm writing on a page the following code with PHP. This code creates a A HREF link with the ID equal to $intIdType, which is the value of the PRIMARY KEY in a database, and $count gets the amount of records per category on the database. All of this is inside a WHILE that reads each record and wr...

0
Q: Evenly redirect users to 18 different pages AND confirm submission

o1o1o111Have a design problem and would appreciate some advice. I am expecting 540 participants to complete 18 surveys. Each survey should have exactly 30 participants (to COMPLETE/SUBMIT the survey - not to just VISIT the survey). The surveys are highly similar (structurally the same; only differ in so...

1
Q: can't do queries undefined property

Boy PasmoI'm new to CI. And just wanted to know where did I go wrong. Seems that I can't connect to my database. So I tried loading the database in the controller, just to see if it can connect and I can do queries. I did configure the database.php and set everything up. But it displays as this. A PHP Er...

0
Q: Get Values from dynamic textbox?

user2901740I have this codes that create a textbox, and each textbox has it's own unique id eg textbox1, textbox2 so on. I had trouble in submitting the data because the textbox is dynamic, u will not know how many textbox created by the user., so I dont have idea on how to post the data eg., $_POST['textbo...

0
Q: How to notify a user everytime an update is done

samuel amadorI want to notify a user that someone has sent a message to her(for example) without refreshing the page. I am using php and jquery(AJAX) to handle this. I am planning to code it using setTimeout(); on javascript to retrieve the data on the database without refreshing the current page. However, ...

0
Q: Split big file in php

user2963041I have form: <form method="post"> <textarea name="add" cols="50" rows="20"></textarea> <br> <input type="submit" formaction="make.php" value="MAKE"><br><br><br> </form> I post few rows using this form such as: lala lalal12 blabla Also I have big txt file words.txt. I need to take random 100...

0
Q: Replace WooCommerce Class

YazminWooCommerce has a class "get_shipping_to_display()" in /wp-content/plugins/woocommerce/classes/class-wc-order.php, that keeps outputting $36 in my invoices (using the Print Invoice & Packing List plugin) as the value for shipping... regardless of what the shipping out is actually. I've narrowed ...

0
Q: How can i insert the id of updated data into different table?

user2963035i want to ask.. how can i insert the id of updated data into different table?.. this is the codes that i had made, i'm using $inserted_id= mysql_inserted_id() but it's not working.. the id still not insert into "updatetrail" table, hope u can help me =) : <?php if (!function_exists("GetSQL...

0
Q: check all checkboxes AND change color of all Jquery

artsyLI have been trying to figure this out for hours, switching it around every which way, but nothing seems to work. Each function works great individually, but I can't seem to get the .change function to fire when the check all button is clicked. What am I doing wrong? The first function is from th...

0
Q: PHPmailer using SMTP dont sent anything to a recipient

Algie RosarioI'm having this problem when use PHPMailer() and SMTP through our Outlook, sorry i'm a newbie with this. The only problem is that my script didn't send anything to the recipient, no error and only this message appear when the PHP script is done: SMTP -> FROM SERVER:220 ethnic.urc.local Microsof...

0
Q: Create new entry in XML file using SimpleXML

Joel PaxtonI'm trying to add a new entry to an XML file using SimpleXML XML structure: <events> <event id="1"> <name>event name</name> <time>09:00</time> <endtime>09:30</endtime> <category>event category</category> <description>A descriptio...

0
Q: Apache misbehaving (returning 404s) - whole site down

OC2PSCentOS 6.4 64-bit Apache 2.4.6 PHP-FPM 5.5.4 Homepage from root loads fine http://csillamvilag.com But all other pages return 404 (CMS is WordPress). I am also able to access and log into WordPress backend. Additionally, Menalto Gallery 3 seems to be loading ok http://csillamvilag.com/kepek/ bu...

0
Q: How can I initialize a group of variables to FALSE in PHP?

David MckeeI want to set all these variables to equal false in as little lines of code as possible. Is it possible to do it all on one line? The code below doesn't work, but that is what I am looking for, instead of doing $a = False; $b = False; etc $a, $b, $c, $d, $e, $e= FALSE; Thanks

-1
Q: PayPal is not Returning a tx value

hallenhttps://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_profile-website-payments After I go to the link to set the 'Auto Return' to ON and 'Payment Data Transfer' to ON and click 'Save', then I try to check it again, both of the options is back to OFF. What is happening. I am new in paypal.

0
Q: jPlayer: How to change src a song before play

user2963055I'm sorry for my bad skill english. I have a jplayer and i want to play with youtube link get from other service. and before play a song i want to change src to youtube link and play. please help me. is there a event for this problem?

-1
Q: PHP image output garbled

GO3DExpansionImage output seems to be garbled text and not the resized image see the link HERE

0
Q: using $this->$Var causing problems

Daryl GillI'm in the process of creating a controller to display pages. I currently have this; $request = str_replace("/Smarty/", "", $_SERVER['REQUEST_URI']); $params = explode("/", $request); function FormatArr ($Arr){ $Array_Keys = array ("PageName","Username"); if (count($A...

0
Q: Pop an element from exploded string and convert remaining array to string

user2690363If I have a name, "Jane & John Doe" and would like to split the two like so: $first = "Jane & John" and $last = "Doe". How do I do that? I know I should have something like this: $name = "Jane & John Doe"; $name = explode(" ", $name); $first = array_shift($name); $last = array_pop($name); I kn...

0
Q: using fp open to write a file data

Jess McKenzieI am trying to write following $routeconfig below to a file however I am only getting the following result how can I make it so it writes the full $route[] = data? Result: screenings/details/$1/$2 page/load/2949/screenings Code: public function hook_process() { if (!file_exists('...

 
3:15 AM
0
Q: Calling javascript elements within php code

user1889798Ok, so what my question is is can Javascript elements be recognized if they are within tags? So like for example: <?php $username = "maniacal"; echo"<p class='welcome' id='greeting'>Hi, Welcome to the site!!</p>" ?> So thats what my php looks like. Then from that can I call the 'greeting' el...

0
Q: unable to copy files having space and bracket in filename

vikramaditya234I am trying to copy the file name "141 (5).jpg" using the copy() function in PHP but I get constantly get hit by copy(/home/141 (4).jpg): failed to open stream: No such file or directory in /home/Upload.php on line 506 I tried replacing space with %20 and even url encoded the complete path...

0
Q: I am populating a text box with data from a select, it works, but

user2900988My select consists of two fields and the text field only picks up one of them. Here is my code: <script> function ProdValue(data) { document.getElementById("ProdName").value = data.value; } </script> <select name="ProdName" id="ProdName" onchange ="ProdValue(this)">...

0
Q: PHP/MySQL to PDO?

Aaron WilsonI'm very new to PHP/Mysql and I naturally have a few questions. I was following a youtube tutorial on creating a simple dynamic website that pulls data content from a MySQL database then displays the content on a single PHP index page. I followed this tutorial to the point where I was using PHP/M...

0
Q: Android HTTP-Post empty JSON

Dhiraj TayadeI need to send a json variable named "json" to the address http://otu-git.dyndns.ws/pvm_srv/serv.php through android device My current code is like this : JSONObject jsn = new JSONObject(); JSONObject json = new JSONObject(); JSONObject header = new JSONObject(); try { header.put("txtUse...

0
Q: Make html post form auto return after submit

7O07Y7I have a simple form on contact.html which posts to send.php with post and mail headers on but it just stays on send.php after submit. How can i get this to return back to contact.html. Can this be done within the php block on send.php?

0
Q: Undefined Variable when not submitting any values to settings

user2896254when I visit mainpage.php without going to settings, my page gives me the undefined variable error for all the variables, but when I input something in the settings and submit, it doesnt show anymore. Anyways, here's the code so far. Mainpage.php <html> <head><title></title></head> <body> <a h...

0
Q: Preventing sql inyection

AlvaroFGI'm currently using the following insert query to update values in mysql using php: $UpdateQuery = "UPDATE `mysqldb`.`cu_data` SET `app_status` = '".$_POST['Est']."', `nacionalidad` = '".$_POST['Nac']."', `ciudad_ini...

0
Q: php mysqli insert failing when returning insert id from function

marabuttWhen calling the function below, A row is only inserted if the insert id is not returned. It has me stumped! Does anyone have any ideas on what is going wrong? public function res_insert() { //$this->dbh is a mysqli object; $this->result = $this->dbh->query( $this->last_query ); if...

0
Q: PHP Extract URL from website output json or xml

user2900302How to extract URL from website... ex "example.com/title/chapter/page" title is string, chapter and page are number I know little bit about cURL and DOM parser but i dont understad how to this one, and i need to get the url, if this one is using cURL how to do this ? i'm try to get the title but...

 
3:39 AM
-1
Q: web development LAMP VM WARE

user2233902I have a LAMP configuration set up in a VM WARE. I am going to transfer files via FTP using transmit client. Currently I have my files in the following directory 192.133.323.122/website/project/home.php Do I create a folder in a specific directory??? Thanks Jose

0
Q: Why is the user always redirected to simpleSAMLphp installation front page?

LillemandenI'm having a bit of trouble setting up a simpleSAMLphp service provider for the first time. I configured the service provider like this: '***' => array( 'saml:SP', 'redirect.validate' => true, 'redirect.sign' => true, 'privatekey' => '***.key', 'certifica...

0
Q: Adding dynamic pages to wordpress website

user2963154I am new to WordPress. I have a project that already has a Wordpress website. All the pages are static in this website currently. The client wants to add new functionality that will involve updating a new database from a new page in this wordpress website. The client also wants to add a functio...

0
Q: Is there any way I can determine and limit the duration of the video being uploaded?

maecy mI am using Extjs 4.2 and php for uploading videos. But I want to limit the duration of the video with the available time the user is allowed to upload. My code only allows .avi and .mov .

 
4:03 AM
-4
Q: Open Source online leave

PaengskiI am looking for an open source e-leave system written using PHP and MySQL. I already check OrangeHRM, but I am still looking for other software to evaluate. Thank you in advance

0
Q: Issue with created_at and updated_at in Laravel 4

zachstarnesI am having an issue with the updated_at and the created_at timestamps in laravel 4 in the when I add a new user using a form and a function written, the created_at and updated_at are all 0's anyone know why? Thank you for all the help! If there is anything else you need to see please let me know...

0
Q: How do I save my the submitted values from settings.php?

user2896254So here's the code for settings.php firstly. <html> <head><title></title></head> <body> <a href="mainpage.php">Main Page</a> <a href="tictactoe.php">Game</a> <a href="logout.php">Logout</a> <form action="mainpage.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type=...

0
Q: PHP CLI don't call good php.ini

kero_zenI try to install a project via composer on my ubuntu. When I run composer install I have the error : [RuntimeException] You must enable the openssl extension to download files via https My apache is installed under /etc/apache2 and php in /etc/p...

-1
Q: Redircting to a page in PHP

narayanpatraI am trying to make a redirect to page based on its referrer. the layout is like <?php $URL_REF = $_SERVER['HTTP_REFERER']; if($URL_REF == "url of my site") { header("Location: url of another site"); exit(); } else { header("Location: my home page"); exit(); } ?> I am get...

0
Q: Insert Jquery AJAX result into TBODY on IE doesn't work

user2963170I've been using this jquery function : <script> function insertData(value1){ $.get( "thisfile.php", { row1: value1} ) .done(function( data ) { $("#tbody1").html( data ); }); }; </script> with this link as trigger : <a href='#' onClick='insertData("test")'>Click Me</a> to sho...

0
Q: Questions about data storage / MYSQL

Papa Charlie1. filters I use PDO and wanted to know if it is still necessary potential escape characters like ('or'' =') Already read a lot and some say that PDO is sufficient to prevent SQL Injection 2. BBCode In a text field htmlspecialchars is the best option for not displaying html formatting? Thanks

0
Q: Php string extraction and manipulation

user2711681I have problem here we I would like to add on the integer part of a serial number. Say I read as JK001256. Thus I can use substring to remove the first 2 char and the rest 6 as numerics. The problem I want to add to the number say 50 means it starts from JK001256 to JK0012306. If I extra the nume...

0
Q: how to make facebook and google+ type image sorting system using javascript and php

Akm Ajay K Maheshwarican you help me that how to make Google+ and facebook type image sorting system .i am also tried some sorting technic like insertion or bubble but still i have some problem so i can't make this type system using php/java-script .

0
Q: PHP video file uploading

mazraaraI need to do a file upload for videos. i am able to upload the videos with php but i need a way to display the file uploading progress with php and when its 100% uploaded i should display the success message. File uploading is currently done with ajax. The issue is, i tried with is_uploaded_f...

0
Q: what is wrong with my income function

Rodney Aaron Cheneyok I haveing some sort of maths issue here and i dont understand why, my thinking is i coded the maths wrong and its adding more then it should basicly its double almost then what it should be here is the function function getUserIncomeTotal($userid){ global $conf,$db; $user = getuserdetails($...

0
Q: PHP: using list() and each() to traverse multi-dimensional arrays

adamdesignSo, for a class assignment, I've constructed this receipt that uses a function to tally up the costs of three items and echo a grand total. The catch is you have to put the specific values into the function to get the results you want, every time. Here's the code: <B>Checkout</B><br> Below is ...

0
Q: Get multiple text messages which get split by the carriers (160 char limit) from twilio

nipunWe are using the twilio account get receive sms The problem is we are saving those sms in our db. We are not able to get any exact field which can help us in identifying that whether the sms was sent as two different messages. As twilio is sending that as different sms with different ids. Basical...

0
Q: Add days to a date (PHP)

Kyle HaglerI am saving dates like so: 2013-11-06 using date function date("Y-m-d") Would like to add three days to the date. Would I need to use strtotime() for this?

0
Q: EMPLOYEE TIME TRACKING WITH PHP AND MYSQL

user2841959I am creating a timetracking webpage using HTML PHP and MYSQL database . My Problem statement is as follows 1> Startpage should have user login with details like employee id firstname lastname and department . the data is entered in employee database . 2> there will be certain project assigned to...

0
Q: WordPress Installation showing error message in iPage Hosting

YahikoHello i am new baby in wordpress CMS. I bought iPage Hosting for my website. When i installed wordpress to my hosting , this error message is showing. Server Response Empty Your server responded with a blank page, which means your server is having difficulties processing PHP requests. If you a...

0
Q: Making first letter capital using regex like in ucwords

SupunI need to convert a String value in to Upper case (First letter to upper in every word). This can be done in php by using ucwords() method. Ex : String myString = “HI GUYS”; myString = myString. toLowerCase().replaceAll(“Regex”, “Some Charactor”) Thanks with hi5

0
Q: Call 2 executable in an API and return the response of one after another

user1583647I have designed an API in php using slim which is called by an iphone application. The API calls an executable and returns it output back to the iphone. As the executable takes a lot of time to execute I want to call another executable which will return some intermediate output to the iphone and ...

0
Q: A way to use php script to input a name and create a local file with the input as in "inputname.html"?

user2738674I need to use the input from a user to create a "filename.html" on the server they are attached to. The program normally takes the input and writes it TO an html file. In this one case, I need to add the ability to create the file they are writing to before the begin writing to it. While I am...

0
Q: Apache give access permission only to server

gamerteen_11I've got WAMP server on my Windows machine (just starting to study Servers and what not so I'm new to all this). What I want to know is how can I give Apache permission to access a folder, but users should not be able to access that folder. I've got a folder containing images which anyone would...

 
4:58 AM
0
Q: Codeigniter Email class inside a model

roozbubuIs it possible to use the Codeigniter Email class within a Model? I have been trying to but it refuses to load the mail object. In general, are libraries allowed to be loaded into models?

0
Q: store and retrieve illegal XML characters for XHTML output

user1123382I need to store content in an xml database. some data in the database looks like this: Henry> 8th Berkley & Jensen I need to load the data into a dom object with loadXML() then pass it to a xsl stylesheet where it is further manipulated using xpath and css. When I load the data the code b...

0
Q: data becomes unsorted after click on pagination link

user2738520According to many records in my database, so i when i fetch it from database and display it, the content that display is very longer. Now, i have used pagination. So it will be easy for user to see the content. I fetch data from database and display it by using table. If user click on header of t...

0
Q: global controller variable not working

Ben CaineI'm running CakePHP 2.4.1 and PHP 5.5.3. I read here about how to create/write to/access a global variable, but it's not working for me. I'm doing something like this: class SploopsController extends AppController { public $crung; public function process() { $this->crung = zax;...

0
Q: Youtube New Comments System API - Retrieve Newest Comments

user2963301With YouTube's latest update on 11/6/2013 to the Comments system, it appears that the API now defaults to retrieving the comments based on the new "Top Comments" rating. In the developer API report: https://developers.google.com/youtube/articles/changes_to_comments YouTube states that newest co...

0
Q: Web page not save correctly in google chrome browser

user2963306When I try to save a web page using the format "Web Page, Complete," half of the time it only saves the the folder containing the style sheet and images, and the .html file is not saved anywhere on my hard drive. How do I correct this? I have noticed it also happens when I use Safari, so it is no...

0
Q: php: how to read in a file, extract first columm, and save to new file?

user1899415I have a TSV file that looks like: 189418720 2234 ACTION 201982934 1451 ACTION 102947192 69 DEFAULT How do I read this in with PHP, extract only the first column, and save that to a new file? I tried to read in my file but it was throwing "type stream" errors at me for using ...

-5
Q: php, ajax and mysql

kathirAki am php developer, creating office use software for billing and invoice with php, ajax and mysql, javscript, i need the application as shown in this link:http://demo.simpleinvoices.org/index.php?module=invoices&view=itemised? kindly provide the code with database , since i am beginner pls provi...

0
Q: Unable to pass value from from a row to another page in AJAX

SuralalI am having a table with 7 columns(Complaintid id,name,school name etc...) and also have button.when i click the button i need to pass the complaintid of that row to another page.pls help me find a way to pass the value. enter code here <html> <body> <?php include '../library/dbconnect.php'; $q...

0
Q: Php Array into AS3 first variable null error , other variables are all fine. Any thoughts? Error #2007

ClarklightI am pretty new to AS3 and php. Trying to pass an Array from Php into AS3 VO file, then parse it into Vector and then package them in boxes. A very odd thing occurred, the first variable that got pass through is always null, i switched the position around, the first variable is still null. But t...

-1
Q: Dreamweaver deleted my file contents

user2073081I was developing a website using Dreamweaver, I was editing one of my php files and suddenly the electricity shut down and my computer turned off. when I turned on my PC again and open the file that I was editing, all the contents were gone!!! When I look to the php file size it was 10 KB so that...

-2
Q: How to add admin approval for new register user in wordpress?

Zahidul Hossein RiponI want the functionality that any one can register in my wordpress site. After register admin get a email. Then he can approve or delete the user. If admin approve the user, then the user can login otherwise the user can not login. Can I do it without using any plugin or should I use a plugin for...

0
Q: regext for export some information from a string

peiman F.i have an output string like this ffmpeg version 0.8.8-4:0.8.8-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Oct 22 2013 12:31:55 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release....

0
Q: dojo.xhrGet Not Sending any Data

PirabaI want to take dojo Get data from ajax to php This is my code : globalHandlers: { doVsatEvents: function(vsatId, network, cpa) { // retrieve the events via xml dojo.xhrGet ({ url: "includes/vsat_events.php?cap="...

0
Q: Update user with array in laravel 4

zachstarnesI am trying to simply update a user but i do not want to have to type whats below because it gets tedious if I am changing a lot of information: $user->name = Input::get("name"); $user->email = Input::get("email"); $user->save(); i want to be able to use an array like this: $newInfo = [ "...

-3
Q: PHP fetch data from mysql and put it in <select>

user2841959Can anyone please tell me , how to fetch names from mysql through php and then put all those names in hmtl select tag for user to choose one name

0
Q: How to use &amp; in nginx conf

UmandaI have a developed website running on nginx + php + Ubuntu. Recently I have developed an automated xml site map generation script. It generates sitemap.xml for all the url which are associate with website. In my website some urls contains argument. Ie. www.mywebsite.com/?q=arg1=a&arg2=b&arg...

0
Q: Need to send image and text to the server

Naga shayanIn my application I need to send image and the note(text of 180) characters to the server. Now am able to send image and text separately but I need to send together now. What would be the approach? Currently am sending image using thread. // open a URL connection to the Servlet ...

0
Q: how to write cron job in php?

NareshI've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question. Below you can see an overview of my goal. I have a Date and Time in this format 11-28-2013 10:52:16 (this is my frontend timestamp) using a small ...

 
5:40 AM
0
Q: How i can combine with PHP and Dot Net Database

user2893238I want to do one project with PHP and Asp.Net. Database is MySql. How i can use the Same Database for both PHP and Asp.Net Website. Can i do that for this method. if i can means how i can use for the single database for both website. if i am passing values in the sense it will be store in a data...

0
Q: How to first compare two dates, then check to see if the number of days is less than or equal to 7

Andrew FoxThe first date is today's date and the second one is being retrieved from a DB. The purpose of what I'm trying to do is that I want to trigger an alert 7 days before the due date, which is the date stored in the DB. I have tried to figure this out a few different ways without any success. I star...

2
Q: Sessions in Node JS

Code HunterHow can I maintain my SESSIONS in Node JS ? E.g I want to store UserID in SESSION using Node Js. How can I do that in Node JS ? And can I use that Node JS SESSION in PHP too ? I want <?php $_SESSION['user'] = $userId; ?> In Node Js.

0
Q: Removing title content from page html

Programming_crazyHere I am creating preview for url. Which shows Url title Url description (title should not come in this) Here is my try. <?php function plaintext($html) { $plaintext = preg_replace('#([<]title)(.*)([<]/title[>])#', ' ', $html); // remove title //$plaintext...

0
Q: how to override a css of sonata admin bundle in symfony2

Aman Varshneyi want to override a css file i.e reside in sonata-project/admin-bundle/Sonata/AdminBundle/Resources/public/bootstrap/css path of sonata admin bundle project. Please help me out.

0
Q: HipHop Runtime options explanations and resources

Joey Salac HipolitoThere are several configuration options that can be found here. But it looks heiroglyphs to me, not all, but I do not know what options are essential to keep a application running. I have a basic understanding on .htaccess when I am running a php application, like setting an index.php as an entry...

0
Q: PHP file path updating after unlink the previous file

Vinoth KumarIn my php file using file uploading control. After unlink previous file and update with new file it's not getting update with new image file. It's showing previous image in listing, when i refresh it's showing new image. Using both listing and update screen in single php file. I used the documen...

0
Q: Cant get the login function to work

user2943347Im sitting now like 3 hours at this and I cant solve this problem. Every time I want to login it says error (no user found). Here is the login function: if($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['submit']=="login") { if(!empty($_POST['username']) && !empty($_POST['password']) && c...

0
Q: Drupal Commerce MIGs Payment Gateway Response Code showing in the wrong place

WeighsoneI am creating an eCommerce site using Drupal Commerce, and am using the 3-party payment process - that is redirecting the user to the banks page to process the payment, and then redirected back to my website once completed. So far its working, i can process (Test) payments and be redirected back...

0
Q: Warning: include_once(./modules/forum/forum_home.php) [function.include-once]: failed

user2963398Please I don't know why this error occur, in facti'm really a dummy to PHP, when i tried to go homepage it brought this error Warning: include_once(./modules/forum/forum_home.php) [function.include-once]: failed to open stream: No such file or directory in /home/nigeriak/public_html/index.php ...

0
Q: What ways would you utilize CONSTANTS in php

ramboramosStarting my ventures in PHP. I am wondering when it would be best to use constants? I feel like it could be used for security reasons: Do programmers use them for security purposes? and if so in what ways?

0
Q: Magento : Update price and QTY based on sku price

JalpeshI have script for the update price and QTY but it takes too much time on live server.I am trying to execute script up t0 4 to 5 hours but no completed process. I also test script on my localhost it takes around 1 Hour and 30 Min for the update 1400 product. Please check my below script and sugge...

0
Q: Getting currency conversion data from Yahooapis now that iGoogle is gone

QuestionerNo27Up until yesterday I had a perfectly working budget organizer site/app working with iGoogle. Through PHP, using the following little line file_get_contents('http://www.google.com/ig/calculator?hl=en&amp;q=1usd=?eur'); and similar I was able to get all I needed. As of today, this is no longer...

-2
Q: Creating a universal search bar in PHP

AdityaI am trying to create a search bar using which user can search for individual users, brand pages etc. The search bar should also show autosuggestion for the search words typed. I am not getting how should i apply the logic for it. What will be the query structure as it will be searching in two...

0
Q: Transferring from Mysql to PDO

user2963430I am attempting to convert my old script from MYSQL to PDO, although came across a small problem. I am unable to fetch multiple results, for some reason. [Most likely my code is wrong] Original <?php $site_pages = mysql_query("SELECT * FROM pages WHERE show_nav = '1' ORDER...

0
Q: Submit Link for a contact form

itsmepeteyFirst off, I have searched an searched this site for answers but every code I came across seems to be so different what I have that I can't seem to find one that fits my problem. Having that said, here is my issue: I am trying to have a contact form on my site that will submit a form to an ema...

0
Q: Error in squirrelmail Remote server replied: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)

user2778768I install hmailserver and squirrelmail on xampp . I have windows 7. When i try to send mail to gmail.it receive succefully mail. But when i try to send mail to hostgator server. It reject mail by saying Error Type: SMTP Remote server (216.12.194.26) issued an error. hMailServer sent: MAIL...

0
Q: how to disable previous date in yii datepicker

EnricoI am using datepicker in yii and I want to disable the previous dates on the calendar to avoid picking them. Here's my code: $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'model'=>$model, 'attribute'=>'arrival_date_as_per_recorded_travel', 'name'=>'arrival_date_as...

0
Q: Auto Count amount with Syntax Error

user2948950Okay, so I have a script that looks like the following: $i = 0; foreach($_SESSION['cart'] as $id => $quantity) { $photo + ++$i =$pwinty->addPhoto($order, $_SESSION['size'][$id], $row['source'], $quantity, "ShrinkToFit"); } Basically I have a variable i that starts out at 0 and increase...

0
Q: Unable to use ajax with php?

Sumit RathoreI am trying to show a table on a webpage. Table get content from mysql table. I have a delete button in my table in each row. I want that whenever i click on delete button that row should get deleted from database and webpage both. here is my code <script> function ajaxFunction(str){ if (str==...

0
Q: Get Data Sent by HttpPost in Java to php Script

user2538967My android app should send data to php script using HttpPost, the thing is I still can't receive any data to the php script, although I monitored that my app is sending data through the network. I used the following php code to get data: <?php $raw_post = file_get_contents("php://input"); echo ...

0
Q: Intricacies on DateTime

Catherine TylerWhy is this odd behaviour ? I want to create this date 2009-02-15 to my specified format, but it shows a year of 1970 . Why is this happening ? I found this example on PHP.net manual. <?php $format = 'Y-m-!d H:i:s'; $date = DateTime::createFromFormat($format, '2009-02-15 15:16:17'); echo "Forma...

0
Q: PHP to MySQL UTF-8 conversion

monamonaI have an issue where i am trying to write 'Hindi/Chinese' string to MySQL database. PHP is converting that to '????' and that is what i can see in mysql. To isolate issue when i directly put that string in mysql it writes it correctly. does anybody have any idea how i ca resolve this issue. (m...

0
Q: odbc connection string for microsoft sql server driver

mgh zahow to set utf8 chaset for this connection? i use code below : <meta charset="utf-8"> <?php $connection = odbc_connect("Driver={SQL Server};Server=MGHZA\MSSQLSERVER2012; Database=test_db;", "sa", "mghza"); $query = "SELECT * FROM t1"; $res = odbc_exec($connection,$query); while( $row = o...

0
Q: Arabic characters and UTF-8 in aria2

mahia MooshooLI use aria2 to have download with XML_RPC and when i want to have a download like this in php : $client->aria2_addUri( array($url), array("dir"=>'/home/amir/دانلود') ); it will create a folder named شسیب instead of دانلود. i post a related post in aria2 forums. and they said aria2 has not ...

0
Q: Strict Standards: Only variables should be passed by reference in functions.php on line 1505

user2963539JB_do_house_keeping(); // this function gets called at every request! JBPlug_do_callback('jb_init', $A=false); **ERROR HERE** define ('JB_INIT_COMPLETED', true); ================================ JB_save_session(); JBPLUG_do_callback('house_keeping_critical_section', $A = false); **ERROR ...

-1
Q: Design images via css and php

nasimjonI have some question about design image on css. I have some logo and i want when click that image open official web site (that image). Is it possible? Thanks for all hints.

0
Q: Recaptcha alert incorrect on same page

FriedpansellerI have the code <form name="input" action="messagesave.php" method="POST"> <table style="margin-left: auto; margin-right: auto;"> <tr> <td style="font-family:'Comic Sans MS', cursive; font-size:20px; text-shadow: 0 0 10px #FFFFFF;">Subject:</td> </tr> <tr>...

0
Q: how i can use same database for both PHP and Asp.net

user2893238I want to do one project with PHP and Asp.Net. Database is MySql. How i can use the Same Database for both PHP and Asp.Net Website. Can i do that for this method. if i can means how i can use for the single database for both website. if i am passing values in the sense it will be store in a datab...

-1
Q: What is NAMESPACE, SOAP_ACTION In Soap..?

user42105I am Implementing a web server in Android and i want to use the soap web service to send a message to the server and get the response. I am new to this. I am not able to get SOAP_ACTION, NAMESPACE and some names in android soap. Along with that I want to use php.

0
Q: ReferenceError: change is not defined

arokiai have function for edit,when user edit the value and click the button then it will save to database but now when i clicking the button i getting an error "ReferenceError: change is not defined" below is my code can anyone tell me where i went wrong and help me how to do that ,thanks ajax $(do...

0
Q: Can I use 'AS' in 'BETWEEN' statement in MySQL?

winonaCan I use as in BETWEEN statement in mysql or something alike. SELECT * FROM status WHERE date BETWEEN CONVERT_TZ('2013-11-01 00:00:00','GMT','UTC') AND CONVERT_TZ('2013-11-07 23:59:59','GMT','UTC') AS firstweek AND date BETWEEN CONVERT_TZ('2013-11-08 00:00:00','GMT','UTC') AND CONVERT_TZ('201...

-2
Q: Browsing images on the server does not work anymore. Instead, the file "browse.php" is downloaded to the user's harddrive

Neeraj SharmaBrowsing images on the server does not work anymore. Instead, the file "browse.php" is downloaded to the user's harddrive.

0
Q: PHPUnit - Testing Last Insert ID

user2909892Can someone pls tell me how do I cover the following exception case in my PhpUnit test? $DB->Insert(db query here...); $lastInsertID = $DB->InsertID(); if (!$lastInsertID) { throw new Exception('Unable to insert new record'); } Thanks in advance

0
Q: Autoload for PHP App Engine to load sdk classes

ip512Is there a existing module or file to manage autoloading of sdk classes when using PHP GAE ? This would avoid to require a file when using a class of the google sdk. Thank you for any clue.

-1
Q: Undefined Index: file_upload

user2963571Below is my Code: <?php require_once("includes/initialize.php"); if (!$session->is_logged_in()) { redirect_to("../index.php"); } include_template("admin_header.php"); $product = new Products; ?> <?php $upload_errors = array( // http://www.php.net/manual/en/featur...

0
Q: Do I need to install PHP, MySQL, and something like XAMP, if I already have an IDE, a webhost, and FTP client?

gwho5150It seems like there are two ways to go, and the determining factor is whether you want to host on your own computer, or through a webhost. If I have an IDE, a webhost server I subscribe to, and an FTP client to transfer my files to the server, then I don't need to install PHP, MySQL, and XAMP, r...

0
Q: Android - How to upload video/image to PHP Server

Avadhani YI am able to post string values to PHP server by using the following code: public void callWebService(String strEmailList){ HttpResponse response = null; String responseBody=""; List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(6); nameValuePairs.add(new BasicNam...

0
Q: Spaces in filename issue

JacquesI have a weird issue. I have a subfolder in a website (Joomla 2.5 with .htaccess, mod_rewrite and SEF urls enabled) folder that contains a bunch of PDF files. They are directly downoaded into that folder via FTP, so I don't have much chance to fiddle with the filenames. They look something lik...

0
Q: Can't Get Aptana Studio 3 Autocomplete/Code Assist To Work?

user2963603Before you answer let me explain. It works fine with local projects LOCALLY but not over FTP even with PHP class files are in the same directory. For example if I have a file I'm including using require 'happyclass.php'; in my index.php file and I want to use a class that's in happyclass call...

0
Q: s this correct coding for prepared statements in php? I have a form with multiple post?

Don AustinI've been trying to get this code to work on inserting to my form but I keep getting one error after another. I'm at my wits end with this and in need of help. I'm new to php and pdo so any help would be greatly appreciated. I've searched this forum and read some books on the issue by my knowledg...

0
Q: post comment on google plus using API

Narendra VermaI want to post comment on google Plus. But i did not get any way to post comment. websits like (hootsuite, sproutesocial) provide google plus posting. This type of websites using third party tool or take permission to google plus for writing purpose. please help me if any resource is available r...

 
7:16 AM
0
Q: simple mail function not working in codeigniter

AmmuI have write this code in controller for sending mail [codeigniter]. $config['useragent'] = 'CodeIgniter'; $config['protocol'] = 'sendmail'; $config['mailpath'] = '/usr/sbin/sendmail'; $config['charset'] = 'utf-8'; $config['wordwrap'] = TRUE; $this->load->library('email'); $t...

0
Q: php session on undefinded constant

user2963660Notice: Use of undefined constant login - assumed 'login' in C:\wamp\www\Online_exam\header.php on line 43 Notice: Use of undefined constant login - assumed 'login' in C:\wamp\www\Online_exam\header.php on line 47 Notice: Use of undefined constant login - assumed 'login' in C:\wamp\www\Online_ex...

0
Q: PHP never receives nested jQuery $.post data

Johan RensenbrinkI'm trying to send simple form data from my index page to a PHP function, checklogin.php. What I'm finding is that no data, serialized or even direct input, is getting through to the PHP function. I know for a fact that the jQuery function is getting called, and I also know that the PHP file is c...

0
Q: PHPUnit handling selenium errors/failures with chrome(ubuntu)

morphlesAfter updating my system, I'm unable to use firefox 3 for selenium testing, so I managed to switch to chrome. But it fails to capture screenshots on test failure: Issues while capturing the screenshot: Invalid response while accessing the Selenium Server at 'http://localhost:4444/selenium-server...

0
Q: ACL permissions and creating new objects

Sander MarechalI am building a Symfony2 application with access controls using custom voters (instead of the built-in generic ACL system). Checking a permission usually looks like this: $this->isGranted('EDIT', $someObject); Which tells me if the current user can edit that object. But how should I handle che...

-1
Q: Limit Moodle only for quiz

SomeshI want performance optimization for my site, its build in moodle and just made for quizzing. I need to optimize it for quizzing only, i don't need to have other features of moodle. I am having 4GB of RAM and expected concurrent users will be 100-120. Any one have solution on hardware aspect or u...

0
Q: Show facebook image using user id in html page

cyclicHere is my img tag to show img <img src="https://graph.facebook.com/"+<?php echo $user_id; ?>+"/picture?type = small"> ..[x] user_id is php variable that I receive here on top of the code: <?php $user_id = $_POST['userid']; ?> what is error in like [x]? it does not show the image

0
Q: How can I track my Office PC(s) to open my website in office only

RG.I developed an application (PHP-website) of data entry and wants that all my employees can work only from office. I wrote a simple code: if(strpos($_SERVER['REMOTE_ADDR'],'122.162.')==0) echo "Authorised Person"; else echo "Unauthorised"; I took only starting 2 slots of IP-address...

0
Q: Downloading an Excel File with php

RecursorI am trying to download an excel file to the client that I save on the server first (for backup purposes). The problem is I get a completely different file server side than I do client side. The server side is correct, the client side lists my sql queries and the time it takes. Note the xlsx is m...

0
Q: How to encrypt with phpseclib, gen random pass phrases, sign and verify

VinceI don't have any quests regarding this topic but I do feel like a more complete/easy to read example was seriously needed because the documentation and all of the online examples/references I've read upto this point made me want to open my skull and scratch my brain I was so confused. So here go...

0
Q: Unable to send SOAP headers to WS

matishwi try to connect to web service. i success to get to the function 'AppendChunk', but with out headers, please Someone, tell me what i am doing worng? the xml i have to send look like that: enter code here string string string ...

0
Q: Facebook API Login - Redirects after login but nothing happends

Tyleri have been running Facebook API to login on my website for some weeks now, but i havent had any problems loggin in at any point. Then suddenly when i / my friends / visitors try to log in the facebook redirects perfectly to my site but the user isnt logged in. Does anyone know this issue? and m...

0
Q: How to create dynamic testfiles with PHP?

Ka RlI want to create a script which gets for example this input "100MB", creates a file with exactly this size and force the client to download it. This is for testing the download speed. The script I have right now is basicly working, it calculates the actual size in bytes and force the client to d...

-1
Q: is it possible to place Wordpress theme in plugin ditrectory

vs7I'm developing a system in which i want to control all of my WordPress whether is theme and im done with it ... but the problem in i need to install Theme and plugin separately and activate both .... But what i need is ... when i install and activate plugin ... my theme is refereed from the plug...

0
Q: Wordpress adding strange html code, breaking some page formatting

DragonDonI am getting this oddball extra inserted into this page above the "Affiliate" title/section. http://londoncapital.biz/affiliate-program/ Using either Firebug or Element Inspector, I still cannot determine where this is coming from. This is the generated HTML. <div class="entry clearfix"> <di...

0
Q: Facebook signout after 15 minutes

cyclicI have kept user login though facebook on my site. Is it possible that I can make user logout after 15 minutes from his facebook account, after he logged in?

0
Q: how to put extension on picture uploaded

impeloin html code i have: Picture 1: <input name="poza1" type="file" /> in php code i have: $fileName1 = $_FILES["poza1"]["name"]; // The file name poza 1 $fileTmpLoc1 = $_FILES["poza1"]["tmp_name"]; // File in the PHP tmp folder $fileType1 = $_FILES["poza1"]["type"]; // The type of file it is $fi...

0
Q: How to control url once share button facebook clicks

user2434677I got a for loop data where in each has a facebook share button, my goal is when the user clicks on the share button it will direct to its assigned page. heres my share button div: <img id = "share_button" src="img/share.png"> fb code: <script type="text/javascript"> $(document).ready(fun...

0
Q: displaying image with dimensions using smarty template

sridharI am using smarty template to render a page on the fly; this is how I am assigning the variables in the php file: $imgsrc1, $imgsrc2, $imgsrc3 contains the location of the uploaded image files $smarty->assign('foto1', $imgsrc1); $smarty->assign('foto2', $imgsrc2); $smarty->assign('foto3', $imgsr...

0
Q: Laravel 4 authentication for different database table

user1995781I am developing a website with Laravel 4, where there are login for back-end cms admin user and front-end member. Both type of members are store on different tables. So, how can I use Laravel Auth for both? Thanks.

0
Q: Searching and filtering / refining database results in Laravel 4

nathanI'm looking for a way to search and filter a database table / Eloquent model through the query string in Laravel 4. I have a table named houses with the columns named: price, name, hasCoffeeMachineand hasStove I want the user to be able to do something like: http://example.com?name=test&hasCoff...

0
Q: Array to string conversion error for array_diff() function

user2963765I get array to string conversion error for the following line: $diff = array_diff($stockist, $arr); Here, $arr is an array decoded from a JSON file. Using the is_array() function I was able to verify that both parameters are arrays. Can someone point me the problem?

0
Q: How to call destructor after response in php?

dragosrsupercoolI have a chat bot which save some data into db which user is sending. I want to save it to db (a slow network call) after sending response to the user. I could do that in Python Tornado but I havent been able to do it PHP Apache. user sends input as request -> we process it -> we send output ...

0
Q: PDO content issue [from mysql]

user2963430I am trying to convert my scripts from Mysql to PDO, although as im only new to PDO I'm having some troubles finding previous stuff that I had done with Mysql. What this code below does, is feteches data from the database and turns it into a page for example if the row 'shortname' is "blank" to a...

0
Q: Update order status with Pwinty

user2948950I am using Pwinty for a project and I'm trying to update an orders status to Cancelled with the API and the PHP Library PHPPwinty. (The function for updating order statuses can be found on line 218.) I have the following code: <?php require_once("../config/printer/PHPPwinty.php"); $p...

0
Q: how do i upload multiple images into dynamically creating subdirectories?

Farhan DharsiI need help to solve multiple upload images into dymaically creating subdirectories into the main folder? Subdirectories creating using input type textbox and dynamically textboxes created using javascript. I have already create multiple textbox using javascript and that is working fine and cre...

0
Q: Soundcloud: increased 413 failures (Request Entity Too Large) on upload

Marco PracucciSpreaker is an audio broadcasting platform with auto-sharing capabilities. When our users create a new audio, we can share it to multiple platforms (including SoundCloud). We daily upload hundreds/thousands of audio tracks to Soundcloud. On November 4th we started tracking an increasing number o...

0
Q: PHP PDO - single query for multiple x fields

user2961797I have three fields, I need to update only the fields that are filled. The possible solution would be the following: <?php if(trim($_POST['field_1'])!='') // query for update field 1 if(trim($_POST['field_2'])!='') // query for update field 2 if(trim($_POST['field_3'])!='') // query fo...

0
Q: How to access model return value in the view using Smarty PHP?

Rochelle CanaleI am studying smarty with codeigniter. I don't know how to access the query returned value from my model. Here's my code. My model class User_Model extends CI_Model{ public function __construct(){ parent::__construct(); } public function getAllCategory(){ ...

0
Q: How to get the Iframe data using curl PHP

user2963823http://tennislink.usta.com/Tournaments/TournamentHome/Tournament.aspx?T=131207 I need to fetch the data from above link. I fetched the data except tabs data that is Important Info,Competitors data

0
Q: Squirrel mail Receiving Error

user2778768I install xampp in windows 7. I want to make mail server . so i install hmailserver and squirrel mail. I have static ip and 3 mbps broadband connction. OK now problem is that All works fine and receive mail at receiver. but after some time (50 mails) it takes to much time to receive at the recei...

0
Q: PHP: How to increment a value in the table row to count views and to limit counts to one IP address.

user2944805I'm using the following to inset a number into 'mviews' every time some map is viewed. Question 1. Where in the following code do i add 'ON DUPLICATE KEY UPDATE mviews = mviews+ 1' so it can increment on duplicate? Question 2. How do i limit counts to one IP? <?php require_once 'db_conx.php'...

0
Q: PHP OOP - Missing argument 1

SporeDevI'm trying to make the switch to OOP programming. I found a pdf on the internet written by killerphp that seems useful. Followed his examples up 'till now because I got an error. The output is this: Warning: Missing argument 1 for person::__construct(), called in C:\xampp\htdocs\oop\index.php on...

0
Q: INR currency symbol on pdf using dompdf

Harish SinghI am using dompdf to create a pdf. When I pass &#8377; to pdf it converts into ? How I can show indian currency symbol in pdf using dompdf?

0
Q: PHP memory leak of simple_html_dom (after the 'parse()' function)

Theo YmcaI am using simple_html_dom. I have found the "parse" function, which runs in the "load" function, will cause a memory leak that can't seem to find why. I have try "$html->clear", "unset($html)" , also "clean_all" from a answered by Flash Thunder. after all thoese work, the memory is still no c...

0
Q: tracking a javascript found in pagesource

user2409250ive tried everything i cud to figure this out, but i cannot track a piece of javascript in a webpage so, just to give you some context even though my problem is not related to just this scenario. it depends on a much bigger spectrum. anyway, im developing on sugarCRM and im trying to edit the de...

0
Q: More information on the error in oci_bind_by_name

calculonIn my code there is some sort of error when performing but I can not get more information about this error oci_bind_by_name($stmt, $binding_val_name, $binding_val) or oci_error($stmt) or echo 1; as a result shows "1", how do I get the error description?

0
Q: PHP mailer not sending and no error returns

Tonzkiehere is my code, tried a couple of solutions like checking if the process is correct and if it's going where I wanted it too. The path. would appreciate any help what I'm doing wrong. Thanks in advance. So far it's outputting $messsageForSender but still not sending. include('code/phpmailer/PHPM...

0
Q: Symfony2 get to the access_control parameters located in the security.yml

Robin HermansI'm trying to get the access_control parameters wich are located in my security.yml as an array in my custom service. Just like with getting the role_hierarchy parametes I thought it would work with the following code: $roleParameters = $this->container->getParameter('security.access_control'); U...

0
Q: Displaying categories once with multiple data in the while loop with html tags

user1462863I have been trying to solve this problem and have find a lot of solutions but still can't get to work. I am so frustrated with the codes and I think I will just do it step by step then instead of lumping it altogether and get it work at once. Right now my tables are: categories | name fashion ...

0
Q: Multi level getters in symfony2/doctrine2

FlanksIm wondering if theres a cleaner way to approach the system i have below, using symfony2/doctrine2. I currently have three entities Entity A - many to one relationship with class B, one to many with class C Entity B - one to many relationship with class A, one to many with class C. Entity C - M...

0
Q: Zend Framework 2 Form Element Select and result from Doctrine 2

sebobI have a problem with form element select in ZF2. I create query doctrine 2 and have good results objects list. $langs = $this->getEntityManager()->getRepository('Application\Entity\Langs')->findAll(); And create simple form: class Coupon extends Form { protected $objectManager; publ...

0
Q: PHP: What's a better way to count views per computer without using IP address as a unique identifier?

user2944805Using PHP and MySQL: Considering that two computers can share an IP address if they somehow using the same server, What's the better method to identify each machine and allocate it one count within 24 hours. Meaning a single machine can only increment view counts once every 24 hours regardless o...

0
Q: bootstrap bootbox show variable in message

Daniel HolstI would like to have the message in the dialog show something like "Choose how you want to kick/ban (playername)" my current code looks like this $(document).on("click", ".btn-ban", function(e) { var username = ($(this).attr('id')); bootbox.dialog({ message: "Choose how you ...

0
Q: Javascript loop create function and append value with PHP Query based id received

Aditya BhattBelow is my PHP MySQL Query and getting the last value result, I want to add 10 Javascript functions into my PHP page at end of page, however counting of variable works but I am not able to concat that value to function and other variable names. Below is my code: <script> <?php $brSql = "SELE...

0
Q: Apache MQ for Java and Apache for PHP merging two web servers

ShudmeyerDoes Apache Mq and Apache can be merge in a single server with no conflict? I try to run each of this services but only one works the other one is not working and vice versa. Am running PHP as my language for Apache and JMS for ApacheMq. Eventhough there are different ports it will not work? Is t...

0
Q: Array rearranging in php

Megha PaulI have got an array which is similar to this: Array ( [0] => Array ( [cartId] => 51 [attributeId] => 171 [Value] => 34 [quantity] => 1 ) [1] => Array ( [cartId] => 51 [attributeId] => 170 [Value] => Adult [quantity] => ...

-1
Q: How can i know user on my site have valid email address on paypal for PHP site

Archiei am designing a site which takes recurssive payments for subscription from paypal on opening a account. we are adding paypal email and password their but how will i come to know its avalid account details?

0
Q: Send Notification to IOS app after payment transaction happpened through web client

sameer MemonI am creating a website as well as ios App. I implemented paypal and creadit card payment with it. Current scenario is when user open ios app and came at the point to purchase something. He'll select option either paypal or credit card. On selection of any option,respective window will open in w...

0
Q: Composer downloads entire .git repo directory

mikeI recently published my library in GitHub and Packagist. When I load it using the Composer, entire repo is being downloaded, along with the .git directory. How to prevent Composer from downloading this unnecesary directory?

-2
Q: How to increment a number by 2 in a PHP For Loop

user2586455The following is a simplified version of my code: <?php for($n=1; $n<=8; $n++): ?> <p><?php echo $n; ?></p> <p><?php echo $n; ?></p> <?php endfor; ?> I want the loop to run 8 times and I want the number in the first paragraph to increment by 1 with each loop, e.g. 1, 2, 3, 4, 5, 6, 7,...

0
Q: String is displayed as Cyrillic - wrong charset?

Glenn Van CauwenberghI Have a problem with displaying a value out of a decoded JSON. The JSON is a response from a Russian API. The value inside the JSON = Object268 But at first it displayed as: Объект 268 After adding <meta charset="utf-8"> to my html it became: Объект 268 What charset do I have to use to...

0
Q: File management in php

user2894116I'm trying to make a file storing and management system. There are two options When i create a folder i actually make a directory of same name in uploads folder and then manage files in those individual separate folders. like Uploads | folder 1 |-file 1 |-file 2 folder 2 |folder 3 |-fi...

0
Q: post form data through two php pages

Luke RixsonI have a Submit form and I originally used $_post to get the from data which worked perfectly. But i then wanted to the user to see what they had inputed and verify that the information was correct before submitting. So the user See's this screen clicks submit and it will the do the original f...

0
Q: inserting data into mysql using PDO, returns error HY093

bobbyjonesim really blurry eyed when coding, and cant seem to find out whats causing HY093 error that i get from inserting data to mysql using PDO function whatever($post_id, $comment) { ... $query = "INSERT INTO `comments` (`id`, `post_id`, `comment`) VALUES (:id, post_id,:comment)"; $sql = $db->prepare(...

0
Q: Not able to select anything in Contao backend without being kicked out

doonotI am trying to setup a Contao CMS instance on my webserver. I was able to install it. I can login to the backend but whenever I try to select something in the leftside navigation, I am kicked out of the backend and have to login again. What could be the problem here? Thanks for your help.

0
Q: Zend Framework 1.x, how to add language prefix at URI ?

jziwenchenI am building multi-language site with ZendFramework. Regarding to URL , I want to it like this: http://example.com/lang/module/controller/action Yes, I create new router at _initRoute() in bootstrap.php file, like: public function _initRoutes() { $this->bootstrap('FrontController'); ...

0
Q: how to implement time based authentication on google doc/spreadsheet with the help of php

user2963971I have only one confusion and want to share with the help of scenario. Suppose, I have a scenario like below: I have one test@gmail.com account and one document namely vivtest.docx, Now, how I can provide privileges to test account for access the vivtest.docx file on 08 & 09 November in writ...

0
Q: Include a php class -the old way- on Symfony 2

DomingoSLI need a fast way to test a code, please I know is not the best practice, but is there a way to load a class on a symfony controller without having to add namespaces, proxy class and autoloader stuff? I tried: public function singlepagestatsAction($id, $pid, $group) { include '/var/www/web...

0
Q: laravel 4 route not found - defaults to show method

RayI've had this working but now a route is no longer found and I can't see why. In a javascript function I am making an ajax post to the function with this url: url: '/customers/storeajax', In my routes.php file I have the following routes: Route::post('customers/storeajax', array('as'=>'store...

0
Q: php connect to server

DavidI am trying to connect to a Network drive remotely using authentication using PHP the network drive is data(\drive_name)(T:). What I am trying to do is access a network drive externally/remotely to view/download documents.I will have about 4 users that will need to access this from own lap tops...

0
Q: Fpdf error that image is not valid jpeg

simmi simmiI am using fpdf to generate pdf file . but after loading it on server i am getting error that "image is not a jpeg file" ??? i am uploading images from android app so is there a problem in image size??

0
Q: Use of undefined constant name

SporeDevI'm following a simple OOP tutorial that I found on the internet. I'm almost finished but I get the error that I mention in the topic. Here is the output: Stefan's full name: Stefan Mischook Notice: Use of undefined constant name - assumed 'name' in C:\xampp\htdocs\oop\class_lib.php on line 2...

0
Q: PHP pattern to add, edit, view and delete database entry

GiorgioI would like to create a PHP class to contain some kind of data (an article with a "title" and a "text"). This class should be used for different purposes: create a new entry : show a form with empty "title" and "text" input fields and a submit button to add data to database (after validation) ...

0
Q: Check if class method has been overwritten

Udo GGiven the following code... class BaseClass { function Foo() { } } class InheritedClass extends BaseClass { /* unknown */ } $inst = new InheritedClass(); ...how can I check if the method Foo() of the $inst instance is still exactly the same as the one implemented in BaseClass and has n...

0
Q: Captcha not showing on CMS contact page - Magento

Dan HumphreyI've implemented a the following captcha into my contact form: http://www.magentocommerce.com/magento-connect/contacts-form-captcha-6079.html However it's acting very strangely, I've set up a CMS page located at /contactus which has this bit of code within the page: {{block type="core/template"...

0
Q: How send email with NTLM authentication from laravel?

messi fani have code like this in laravel to send email public static function send_email(){ Mail::send('emails.g', array(), function($message){ $message->from('leo_messi@barcelona.com', 'lol'); $message->to('neymar@barcelona.com')->subject('LOL LOL'); }); } my email...

0
Q: How do I insert array elements results of an implode() into each row?

SirBTI have an HTML form with checkboxes for day option much like the ones indicated below: <input type="checkbox" name="A" value="Daily">Daily<br> <input type="checkbox" name="B" value="Sunday">Sunday<br> <input type="checkbox" name="C" value="Monday">Monday<br> I then successfully read the checke...

0
Q: php SimpleXMLElement get children with another xml namespace

user1005064I have a soap request and I need to parse it and get the Uri from posted XML file <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001...

0
Q: How to create Date() from timestamp by server time?

KirixMy web app is currently hosted somewhere in Great Britain and i have 2 hour difference with it but i need to use the time that is used by the server. So i use time() * 1000 and create from this timestamp new date object like time_data.minDate = new Date(<?php echo $test_time['start'];?>);, but i ...

0
Q: magento product detail page returns 404 not found error

Suresh KantharajThe homepage shows all products in grid and if I click details of products then product detail page returns 404 not found error. I Reviewed all possible solutions like URL rewrite,clearing cache,logs,core tables of product and catalogue.It does't work. Need help!! Thanks in advance!!

0
Q: Best way to pass a vector as an output of an exe

user1583647I want to create an executable in c++ which returns a vector as an output and get that output in php. I don't want to save it in a text file. What are the options of doing this? I have tried by using cout in c++ and get the output in php. Any other effective way of doing this? Can I return a stri...

0
Q: For Prestashop: use 2 query for value with IF ELSE.. how declare new variable?

user2964048I have table ps_orders with (total_paid) and (current_state) If current state is "3" write "total_paid" if isn't "3" write "0" I extracted $total_paid value, but i cannot declare $current_state variable $query_cod = "SELECT total_paid FROM ps_orders WHERE current_state = 3": $result_cod =...

0
Q: File Download Not Work In Mobile browser

Arman ArafatI installed an auto index script. Everything worked fine with my site. But i faced downloading problem with mobile browser. I can download file to pc browser, but can't on mobile browser like opera mini,uc browser and other default mobile browsers. Anybody here for fix this problem? Below is my c...

0
Q: sort second level Array

Phil Harmoniei have this Array: Array ( [0] => Array ( [kw] => 46 [anzahl_betten] => 100 ) [1] => Array ( [kw] => 47 [anzahl_betten] => 100 ) [2] => Array ( [kw] => 45 [anzahl_betten] =>

0
Q: Renew or create permanent Facebook access token to post app page

LappiesAfter following the steps of the answer marked correct on this question, I was able to post to my Facebook page via my app, the problem is the access token expires after 2 hours, I have gone through so many articles and found a lot of different ways but can't get them to work, I want to be runnin...

0
Q: Adding a parameter to globally filter entity listing in sonata admin

Sarimwhat i'm trying to do is implement two version of a site using locale. i have two locale, en and bn. now i have a locale field in my entity. entities with locale=bn belongs to bn version of the site and entity=en belong to en version of the site. now what i need is, to edit the query that is use...

0
Q: Postfix issue not using relay all of the time

user2863461I have an issue with postfix/php on an Ubuntu server. I have set up a relay to use Amazon SES, and im able to send mails fine using commands. When my PHP applications on the website try to send e-mails - seems to try to send directly over smtp rather than using the relay. The logs say relay=none...

0
Q: Google Place API marker issue

user2959740I am creating itinerary planner like http://www.plnnr.com I want to create Google Place marker by direction(North,East,west,south) for e.g. When people select 4 day it should show attraction for 1st day all north location 2nd day east location then south and west. How to i do the auto marker. i ...

-1
Q: PHP array combine and sum for undefined array depth

user2847321I need to merge two arrays of undefined dimensions by summing the values of the matching keys (and if not matching -> append). Can you help me? Thank you!

0
Q: Undefined value to database using ajax when button is clicked

arokiaHi i have table i am performing an inline edit and i am trying to update value to database using clicking on the button(i.e:img),i tried with onclick function but its edit value,it shows "value=undefined&rowid=undefined&field=undefined" , below is my code.can one one guide me how to do that ....

0
Q: create session with recordset stored in array

SherwoodProHow can I take a recordset, store it in an array and then make that array the value of a session? Here is the code I came up with: $results = array(); do { $results[] = $row_getAC['area_code']; } while ($row_getAC = mysql_fetch_assoc($getAC)); $_SESSION['area_code']= $results; This just re...

0
Q: PDO IF page_header = image show code

user2963430What im trying to do is that if in a field in my table [connection Already included, by a config file. YES this works] that if a field is a certain word it will show a piece of code. <?php $q = $dbh -> prepare("SELECT * FROM pages_extra WHERE name='page_header'"); $q -> execute(array($_POST['p...

0
Q: remove child from xml by id

Juraganerkai have a XML file like this. <T_Person> <Person> <ID_Person>5B32EB71-E527-482B-B01B-07502D968E70</ID_Person> <First_Name_Person>u</First_Name_Person> </Person> <Person> <ID_Person>C47E80CF-6BDB-49CE-BCF4-20E7E08835BF</ID_Person> <First_Name_Person>l</First_Name_Person> </Person> <Person> <...

0
Q: PayPal not returning any value

user1995781I am trying to do PayPal integration with my website. However, I found that PayPal is not returning any value on my sandbox account when I complete the payment. I do some searching and I found this page (https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_profile-website-payments) which allows ...

0
Q: Jquery unidentified data return when post

Nhat Tuan<?php //load.php $myid = $_POST['id']; if($myid == 1){ echo '1'; }else if($myid == 0){ echo '0'; } ?> <html> <input id="id" /> <div id="resurl"></div> <input type="button" id="submit" /> <script type="text/javascript"> $('#submit').click( function(){ var send...

0
Q: Jenkins build with ant: exec returned: 1 with phpunit?

EvilKarterI'm new to jenkins and I try to execute some code analyis together with ant. I used the build XML from this tutorial http://jenkins-php.org/. But I always got an error like this: /var/www/ekc/build.xml:117:exec returned: 2 So I used this Solution: StackOverflow question But now I get this Er...

0
Q: Change a field if a statement is correct

Luke Nichollshow do i change a field (completed) in my table to yes if the statement is correct? if (!$_REQUEST['sceneaccident'] || !$_REQUEST['notrequiretreatment'] || !$_REQUEST['house'] || !$_REQUEST['recommendations'] || !$_REQUEST['Prognosis'] || !$_REQUEST['CV'] || !$_REQUEST['cervical'] || !$_REQUEST[...

0
Q: WP Bootstrap Tabs - multiple tab codes one one page?

user2964150I'm learning to use bootstrap and have come across an issue that i cannot get past. When adding another instance of the [bootstrap_tab name]...[end_bootstrap_tab] the second Tab that i try to add gets all messed up you can view here it seems to duplicate the first tab and my second tab (with numb...

0
Q: Alert message on google map api

DevelopmentBucketI want to make a web application where visitor able to add a message on google map with my website for particular place . lets say if Mr. Smith in New Delhi and he find a interesting thing at specific place in New Delhi he would able to add message for that place on the map. and i want to do al...

0
Q: How i can print report without first row of table

Navjot SinghI want to print some reports in my project my problem is printing report format you can get some idea from links. Now i print div but I want to print first row hide while printing this is now i print I want this format

0
Q: HTTP_REFERER and https

McNabI'm trying to work out how to establish whether or not a visitor to a site I built has come from Google or not. The client is running an Adwords campaign and Google has objected to the fact that the user is redirected when they arrive at the site, so I need to add an exception for this. It has ...

0
Q: Out of memory (Needed 2465528 bytes) when executing large sql query string in php mysql(xampp)

snehali want to import my MS access data to mysql database.so i am using xampp. i wort php code that fetch the access table and created query string. when i execute my program it is giving me following error: Out of memory (Needed 2465528 bytes) my code is: <?php $conn=odbc_connect('my','','');/* c...

0
Q: What do I need to user to find and replece words with _ extensions

AndyI have about 20 php documents and I want to change a word I used in all documents which been used over 1000 times. When I tried to replace the word with the _ underscore extensions it does not work! say I want to change the word example to stackoverflow when I changed example to stackoverflow ...

-2
Q: How to find string length in php without using strlen()

user2964151How to find string length in php without using strlen()?the condition is to take value of a=b=c=2, for words containing these alphabets?

-3
Q: MVC: I need to understand the Classes and its functions

ShakeelPlease give me any example in which you illustrate a Function in a class. How i will be able to access that Function of a class in another file.

0
Q: can't use restful service with php

RefaatI'm using restful service in order to make get and post requests with php, it's a ready made code here, it works fine with the get process but it does't work when coming to the post, i'm only assigning the parameters that it will be passed to the function, for example like that: $resp = httpRequ...

0
Q: Remove delete checkbox Sonata Admin Bundle

GBRocksI am using Sonata admin bundle and I have embedded admins. The child entities are listed as a table structure. I have removed the delete route for the child admin. But still delete checkbox is coming when the child is embedded. i.e I have a Product table and a price table. I am embedding the pri...

-1
Q: PHP in-line Framing

SteelDevilHello all who read this, I've got a question about in-line frames concerning HMTL,CSS & PHP i have a stylesheet.css for the menubar and navigator etc. etc. which is applied to a index.html file. in the index.html there is a in-line frame which will link to one of my products, index.php yet if i ...

0
Q: Add attribute to product

Thomas TeilmannHello Stackoverflowers I have been given the assignment of expanding the Magento API with a new product attribute: finalPrice. The method of finding the finalprice i got pinned down, but adding the attribute is kind of a mystery to me. In the past i have been trying to do something similar, by ...

0
Q: WordPress AJAX Pagination with query_posts

grayI have a list checkbox categories, which when checked, use WordPress's admin-ajax.php to filter posts to the selected category. All is working great, however, I am struggling to get the updated pagination. I'm using query_posts as follows: $paged = (get_query_var('paged')) ? get_query_var('page...

1
Q: E: Invalid record in the preferences file /etc/apt/preferences.d/php, no Package header

user2956452When I am trying to unintsall php in ubuntu using sudo apt-get -y purge php* I am getting the following error. E: Invalid record in the preferences file /etc/apt/preferences.d/php, no Package header Any help!

1
Q: Could not load other mapping of entity in doctrine2 and zend 1

user1597721Anyone, please help for me this issue. I'm the newbie of Doctrine. After some time to configure the doctrine(version 2.3) working with zend(version 1.10.8). All working fine except the last step. I have a table "test table" like this CREATE TABLE IF NOT EXISTS `testtable` ( `id` int(11) NO...

0
Q: Error in loading the data in jqgrid

DaduI am trying to load the output from a php script into jqgrid but i can see the table without data. <div id='Results'> <div id= 'abcd' style="display:block";> <?php include("simple.php");?> </div> <script type="text/javascript"> jQuery(function($) { var data= $('#abcd').text(); var data1= data....

0
Q: Zend 301 Redirects some mysteriously not working?

Stevie GI have a problem whereby some redirects are not working and some are. I am using a crude way of doing a redirect, which is catching the url in the errorAction of the ErrorController and then having a few if statements and then ding the redirects as follows: public function errorAction() { ...

0
Q: match command that is not inside a comment

KaiiI have input like the following example(s) and need to replace all \input{.*} commands, that are not preceded by a % somewhere on the line. The input is LaTeX code, where % is starting a comment. That means that everything after % on the current line should not be interpreted as actual code and...

0
Q: Issue displaying SQL IMAGE type as an image in PHP

Rick MoriceI have a webservice I'm connecting to. I'm getting valid responses back for my queries, and one of them is an IMAGE type. I'm not in direct control of the DB, and they don't really offer support - so I can't ask them about the specifics. I need to offer links to display or download this image. T...

0
Q: How can I check if two array are same

Megha PaulThis is my array [51] => Array ( [171] => 34 [170] => Adult [168] => 32 [quantity] => 1 ) [52] => Array ( [171] => 34 [170] => Adult [168] => 32 [quantity] => 1 ) Now if all the keys and value except quantity are ...

1
Q: How to implement filter in codegniter frame work

user2964333Hi Friends I have a Webpage here I am Displaying My Product details ,int this page i want the following requirements Display products should have filtering options: a. From lower to higher price b. From Higher to lower price c. Newly created d. Alphabetical ...

0
Q: How use one controller function in another controller in cakephp 2.x

nithinmk089I want to create comment form in my all posts page. Here I am showing all posts with comment option. Here I am using a bootstrap model for comments. I have to store the comments in my comment table. How can I done it?. The current page has model Post and controller is Posts Controller and comment...

0
Q: Show a single cell data from sql

IKRPhp and sql is new to me.So I face a simple problem. My table name is student_table(id,s_name).Now I want to select the id of 'Shakib'. My code : <?php $username="root"; $password=""; $database="mydb"; mysql_connect('localhost',$username,$password); @mys...

-2
Q: #1030 - Got error -1 from storage engine

Ruban RehobathWhen i try to insert data into mysql database i got error Error Msg #1030 - Got error -1 from storage engine Please Advise to solve the problem as soon as possible

1
Q: php - check and correct related items?

theclueless1So I have a huge array of parts. With a lot of help, I managed to associate related parts with a singular reference key. Thus I have the following data; array( array ( 'make' => 'co1', 'model' => 'mdl1', 'part' => 'prt1', 'price' => '50', 'uid' => '1', 'rid' =>'1' ), array ( 'make' =>...

0
Q: MySQL PHP - Inserting form data into tables. Unknown Error

user2910809So as the title stated, I'm trying to insert data into 2 tables if the form passes a few conditions (the user is logged in, the user hasn't voted on that product before, all of the fields have been filled in). It was inserting the data into both tables perfectly when the condition was just: $sq...

0
Q: Make div with dynamic background img url a link

proPhetI have this PHP: <?php $image = "IMAGES/default_profile_img.png"; ?> This is the linked div <a href="page.php"> <div class="profile_img" style="background-image:url(<?php echo $image; ?>)"> // image itself displays correctly </div> </a> The div above is subject to this CSS: ...

-3
Q: Php Ajax usage in html button

user2964355<a class="prev" href="index.php?month=__prev_month__" onclick="$('#calendar').load('index.php?month=__prev_month__&_r=' + Math.random()); return false;"></a> need to apply this function to a button on html code Can anyone please tell me what are all the things used here?

0
Q: Explanation requested for a specific regxp

DanielI am learning Regxp. I never really thought about it to much, but i thought it would be a good idea to do now. I have an issue understanding the "+" sign. Here is my example: $array = array("123 Main St."); $match = preg_grep("%^\d{1,5}\s[A-Za-z.]+\s[A-Za-z.]{2,7}$%",$array); foreach($match...

0
Q: payment information is not showing in checkout module

Sunil Tiwari 2222222when a login in dashboard to show in home page, then a click in menu and submenu redirect in product page, then after click in Add to cart redirect in proceed to checkout, then login in checkout after show in billing information, shipping method,shipping information, and not show in payment info...

0
Q: HTAccess Rewrite based upon a Parameter Value, ignore other Parameters

Bartonanother HTAccess rewrite issue, sorry.... I'm trying to rewrite all URL's that have menuid=28421, menuid=27384 and menuid=73841. The issue is that the menuid is part of a longer query string, but not all parameters are present in the query string. I want to rewrite only based on the value of men...

0
Q: SQL Structure of DB table with different types of columns

Dmitry DvornikovI have a problem with the optimization of the structure of the database. I'll try to explain it exactly. I create a project, where we can add different values​​, but this values must have different types of the columns in the database (eg, int, double , varchar). What is the best way to store th...

0
Q: cakephp. how to compare password with password in database

Kordian WiklińskiSince few days, almost one week, i have an issue, to compare passwords in cakephp. I'm preparing edit user view, and befor user will be able to change his current password he needs to type his old password. ( i'm extending authorization tutorial from cakebook.) While user is creating his passwo...

0
Q: Uncaught exception 'PDOException' with message 'SQLSTATE[42000

Jonathan ThurftI am trying to update a table from a CSV. The following error appears when trying to insert a row. Other queries go through in the same loop but it stops there on a particular one. I've checked if all the values match exactly with the DB table and they do. I am out of ideas on what could be the...

0
Q: Magento app/etc/modules/*.xml keep re-enabling themselves

HeatonjbAfter I updated the DB on my staging server with the production database I keep on getting some really mysterious behaviour. The site was working correctly after the db update. However, then at 3:49am in the morning a number of the modules xml files in app/etc/modules were changed. A numbe...

0
Q: Facebook API login - Redirect after login but nothing happens

TylerI have been running Facebook API to login on my website for some weeks now, but I haven't had any problems logging in at any point. Then suddenly when I / my friends / visitors try to log on to the facebook redirects perfectly to my site but the user isn't logged in. Heres the error code i get o...

0
Q: .htaccess (URL rewriting) works on one server but not the other

Janusz JasinskiSo /videos/watch/2013-highlights work on Server 1. However on Server 2, it throws up a 404. The .htaccess is the same for both and sits in the videos folder Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ ...

-6
Q: Insert value click on image in php

shaktiI want to insert value in database using Php. my code is here <img src"image/insert.png">

0
Q: zend db quote without quote so more like escape

John MagnoliaI am trying to do something like this: $url = 'test/'; $url = rtrim($url, "'"); $url = $db->quote($url); $sql = "SELECT * FROM mytable WHERE url = '{$url}' OR url = '{$url}/'"; But this return: SELECT * FROM mytable WHERE url = ''test/'' OR url = ''test/'/' I basically want the equivalent of ...

0
Q: Sending HttpPost from Java but not receiving anything

user2538967I am sending HttpPost with data but I am getting nothing. I don't know if the problem is in my java or php script. Posting data in Java: ArrayList nameValuePair = new ArrayList(); Iterator it = mData.keySet().iterator(); while (it.hasNext()) { String key = it.next(); nameValuePair.add(new Basi...

0
Q: xmlrpc multidimensional array

BasBreaking my head ;-) I'm using xmlrpc for php.. I got the instructions to send this request to the server: 'lines':[{'product_cod':'ZOIX333','qty':1.0,'price_unit':366.00,'discount_pct':0.0,'taxes':33.00,'tax_included':True}], #{...},{},{}] So I tried: $order_line_items = array( ...

0
Q: PHP@Windows & NodeJS as a target on exec/etc. - code 8

eRIZI want to perform some kind of simple Javascript tasks, in this case - Regex validation (which differs a bit from PCRE's) - but what task - it doesn't matter because the problem consists of a process execution. The situation: $x = shell_exec('C:\\lib\\nodejs\\node.exe -v'); Works like a charm...

0
Q: How to remove HTML from a value when sending $_POST / $result with jQuery PHP?

CyborgI have a jQuery script which onClick Button requests and imports values from a PHP file and inserts this values to a form. Now I can successfully get values to the correct fields but the problem is the values contains HTML codes and I do need only TEXT results. I need value for Field: "Ethnicit...

1
Q: javascript inline if variable assign value like php

Panagiotis George RaditsasHello in php I can do this: $value = 0; $test = $value === 0 ? 'it is zero!' : 'It is not zero.'; echo $test; How can this be done in javascript in 1 line like in php without using the classic if - else if statement?

0
Q: Apache error when php return big data

sincosI have a php script. it is a php download page. everything fine. if download file about less than 50MB. But i have an Internal Server Error if download file over 200MB. i was check apache error log and receive: Premature end of script headers: index.php Please help me. I know that is an apac...

0
Q: one ajax call instead of multiple looped calls

Barry WattsI have a group of 2d arrays in JS and I want to update the MySQL db with the contents of the arrays. Currently I am looping an array and doing an ajax call for each element. I know this is bad and what I should be doing is sending the arrays to the ajax page and then doing the looping in there...

0
Q: Search Form Ability To Ignore Blank Fields

user2803146I have made a HTML search form which creates a query to a MySql database based on the contents of a form. What I would love to do is ignore the search parameter if the user leaves that specific form field empty. There are lots of answers online, especially on this website, but I can't get any of ...

1
Q: PHP call from other class the parent methods from child

Paolo RossiI've 3 classes in my project (connection , parent and child class). Parent class Upload { public function Upload($name){ /* some code */ } } Child class Photos extends Upload { public function getUrl(){ /* some code */ } public function UploadPh...

0
Q: Mysql multiple joins, duplicated data returned

user2964415I am trying to run a query which gathers data from multiple tables: - Lantern -Lantern_type -location -loan -borrower The query should return the specified data, my current query returns this data but returns duplicates of it multiple times. Can anyone help?The query should return the specified ...

0
Q: Generating New Array from Laravel 4 Input

GazI'm getting some input from a dynamically generated form (I'm using jQuery to allow the user to add fields) using Input::all(). The field names are 'first_names[]', 'last_names[]' and 'emails[]'. The $input variable now looks like this: array (size=4) '_token' => string '3VCQFUmAx8BNbSrX9MqjG...

0
Q: Magento - empty cart after adding product to cart in Safari and Chrome

user2964426I am using Magento 1.7.0.2 and I just found out I can not add an item to cart in Safari 7.0 and Chrome 30.0. It says the cart is empty after I add an item to cart. You can try it here: http://www.vesele-veci.sk/odporucame/kalendar-2014.html I am not aware of editing any core or cart files. It w...

0
Q: php - explode string at . but ignore decimal eg 2.9

StevenPHPCurrently I am exploding a string at . and it works as I like. the only issue is that is also explodes when the . occurs as a decimal point. Is there a way of excluding decimal points from the explode function? My current setup: As you can see it is exploding at . between the two numbers $Strin...

0
Q: Symfony 2: Routing prefix as follows the Virtual Host

maximeI've got a Symfony application that have 2 bundles: a public bundle (callable by the URL /public/blahblah/test/...) and an API bundle (callable by the URL /api/getIt). I created 2 subdomains with 2 vhosts, one for the public, one for the api. Now, I'm looking for a RewriteRule or something else ...

0
Q: Get user details in Google Oauth 2 response

AsurayaI try to get user details after successful authentication. This is code. $url = 'https://www.googleapis.com/oauth2/v1/userinfo?access_token='. $result->access_token; $user = json_decode(file_get_contents($url), true); This is user array. Array ( [id] => 100561185285391912686 [e...

0
Q: how to get highest integer value from mysql table PHP

Virat21how to get highest integer value from mysql table PHP $getingstoredata=mysql_query('select number from number '); while ($getstd=mysql_fetch_row($getingstoredata)){ print_r($getstd); } and table stricture is same like this image ht...

0
Q: Php-Mailing script, in background

user2936093Hy everybody, I wan't to make a email submit formular: you can wright your email adress, you click on the button "send" and I get the a email with your email adesss. So far so good but now when I click on the butto It opens the php-page. Is it posibel that this script is in the background (meani...

0
Q: Non detailled error when opening website in IE7

FoxLiftI have a problem with my website, and I have no ideia with what. The site is http://www.jpg.pt. It's made in joomla 3.0, with a template made with artisteer. When I open one of my websites, it works everywhere, except in an old internet explorer 7 browser (windows Xp). It just outputs the follow...

0
Q: PHP execute linux command using exec()

Marijn van GoolSo, i'm on my ubuntu server and want to execute the following command: su -c /path/to/command -s /bin/bash -l otheruser When i type this command in the linux command line, it perfectly asks for the password for the otheruser and executes the command. However, when i do it like this exec("su ...

0
Q: Delete restrict using web.config?

AshishI want that my client can upload any file to a folder but he could not delete that file. I am using ftp server so is there any way to do this. Is there any way using web.config file?

-2
Q: I will like to recall a the same fucntion after submitting my form

user2956297<td><input type="radio" onclick="selbustbl(1)" name="rdo1" id="busyes" value="yes" <? if(isset($_POST['rdo1'])&& $_POST['rdo1'] == 'yes') echo "checked='checked'"; ?> />Yes</td> What I would like to do but is not working is something like this <td><input type="radio" onclick="selbustbl(1)" na...

0
Q: Wordpress getChildren using to make an menu

DomiMy problem is: i Want to make my own Menubar that looks like this: As you can see the buttons on the top are FIXED (these are the 6 Parents in which the Pages can get) If you press on the green button the submenuitems appear. Now - if you press on the submenuitem the submenu should appear unde...

0
Q: Unable to display arabic content

user2646207I am trying to fetch arabic data from mysql database collation utf8_general_ci but while inserting data in database worked fine.When i tried to fetch data it gave me some different symbols. //*$response = array(); $username = "root"; $password = ""; $hostname = "localhost"; //connection to t...

0
Q: Getting an ajax value in a pop up

SushmaI have a link in my parent window with url and class as automodal. On click of the link I am passing an ajax request which returns a value. I want to show this value in the automodal pop up. I have placed a div tag in the page that opens in a pop up and tried to append the return value to the di...

0
Q: How to rename Yii's controllers using urlManager Component

Ali MasudianPourI need to access my controllers with another name. For instance my controller name is *form_number_98*. But I need to access mentioned controller by calling it through URL some thing like */form_98*. All above mentioned will be done by the following line: 'form_'=>'form_number_', But what if...

0
Q: Prestashop generalities

RayjaxI have to work on an existing prestashop project to make some improvements (change some logos, add some JS, create new pages). I have a good experience as a web dev but I have never used prestashop. The client simply gave me his FTP info and his admin logins, and I am getting a bit lost in all th...

-3
Q: Php Ajax Html and Javascript usage in code

user2964355<div class="navigation"> <a class="prev" href="index.php?month=__prev_month__" onclick="$('#calendar').load('index.php?month=__prev_month__&_r=' + Math.random()); return false;"></a> <!-- <div class="title" >__cal_caption__</div> --> <a class="next" href="index.php?month=__next_month__" onclick="...

-2
Q: Rss Reader with ajax and php

user2964533Guys i have this error massage when i try to show rss reader function output , how to solve it ? Warning: DOMDocument::load() [domdocument.load]: Empty string supplied as input in C:\xampp\htdocs\DataComponent\rss.php on line 24 Fatal error: Call to a member function getElementsByTagName() on ...

1
Q: Regex OR functionality

Varun kumarI have a html content such as follows: $html = "My name is Varun-Kumar. My webpage is <a href='http://varundeboss.com/varun-home-page'>Varundeboss</a> Also http://varundeboss.home.com/varun-home-page"; Now I want to remove all the occurrence of "-" from the html except if it occurs within the ...

0
Q: Why in this MYSQL query WHERE clause is ignored?

user2964516I am trying to make this to count table's rows which have specific category, but it doesn't seem to work. It always returns total amount of rows in the table, so I came to conclusion, that WHERE clause is simply ignored... Could anyone tell me what I am doing wrong? $c = $_GET['c']; $max = mys...

0
Q: update a form after all fields not being completed

Luke Nichollsthe issue im having is that when a form is submitted but there are fields missing, i want it to say 'You did not complete all of the required fields' and then have a link back to the form. but the link goes back to the form but without the completed fields, which is due to the refernce not being ...

-1
Q: copy real URL and store in a variable

user2964545i want to make a site that can give original link from a shorten URL. i want that user input a short URL and click on submit button then redirection URL should open in background a function copy the URL and store it in a variable,Plz tell me ho can i do it.

0
Q: Chrome adds "-, attachment" to downloaded file

Michael MöhlihsI use Symfony2 Framework and use the following code to export an xml file: $response->setStatusCode(200); $response->headers->set('Content-Type', 'application/xml'); $response->headers->set('Content-Description', 'Submissions Export'); $response->headers->set('Content-Disposition', 'attachment; ...

0
Q: Update record where category_id=0

SadikhasanI set category_id to 0 and category id is auto increment. so I update this record in cakephp then cakephp will insert this record insted of update this record. $this->Category->id=$id; $this->Category->save($this->data); Pls help me...

0
Q: How to javascript call iframe loaded file function

user2893932i have this code on index.html <body> <iframe id=iframetest src="alt.html"> <p>Your browser does not support iframes.</p> </iframe> <script> $(window).load(function(){ document.getElementById('iframetest').contentWindow.myFunction(); }); </script

0
Q: Whats the best way to work out which week it is within a month?

ExoonI want to work out which number week it is within a certain month. For example Days 1 - 7 = Week 1 Days 8 - 14 = Week 2 Days 15 - 21 = Week 3 Days 22 - 28 = Week 4 I know there are more days in some months than 28 but that doesn't matter i only want to work out 4 weeks worth. Thanks in advan...

0
Q: PHP - Get image with fsockopen

DJZorrowI am trying to grab an image from an external server with fsockopen in PHP. I need to get the image data into a variable in BASE64 encoding in my code. The image is a .jpeg file-type and is a small image. I could not find any answers on Google after some searching. So i wonder if it is even dire...

0
Q: Get Recordset by Looping and then insert records if not found in loop

SherwoodProThis is confusing me. On one page, I have a recordset stored in a session called: $_SESSION['area_code']; This might hold one value or multiple values. Such as '614' and '757'. It is creating this session, then deleting a bunch of records from a table. Then - on another page - I want to do...

0
Q: How do I access certain parts of an array for use with flot charts?

XeoI've got an array below via print_r, however I need to only use part of this so I can use it in flot charts. Array ( [success] => 1 [timestamp] => 1383824357 [data] => Array ( [0] => Array ( [label] => customer1 [SUM(value)] => 12345) [1] => Array ( [label] => customer2 [SUM(value)] => 6789...

0
Q: google drive media file upload error

user2511140I use this code to upload files to google drivethis works for local file but for upload file from url show this error: Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling PUT https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable&key=AIzaSyAFJ2i7P...

0
Q: Adding a attachment (jpg) to this PHP mail Script

user2964588I was trying to add a code, that allows me to send a attachment (jpg) over php! My current script: <?php $input = array("@[XXXX:0]", "@[XXXX:0]", "@[XXX:0]", "@[XXX:0]", "@[XXX:0]", "@[XXX:0]", "@[XXX:0]", "@[XXX:0]", "@[XXX:0]", "@[100001532044177:0]", "@[XXX:0]", "@[XXX:0]"); ...

0
Q: Wordpress - In "Add This" plugin Email counter is not working

YamunaI would like to add specific social share icons on WordPress posts with individual counter. E.g Twitter (1), Facebook (1). I have used "AddThis" plugin and following custom code is added <div class="addthis_toolbox addthis_default_style addthis_20x20_style"> <a class="addthis_counter_fac...

0
Q: php sendmail() from same domain - is it considered SPAM now?

Adrian TanaseI want to know if using PHPmailer functions to send HTML or plain emails would be not considered as SPAM by mail servers if it would originate from the domain with the same name. For example : sending email with PHPmailer as "info@mydomain.com" originating from "mydomain.com" domain (as oppose...

0
Q: Framework for encyclopedic content, Mediawiki?

netterdotterI need to create web front ends for several projects at a non-profit. The projects range from specialized dictionaries to mini biographies and descriptions of places and concepts. All in all it's quite encyclopedic and I've been looking at MediaWiki as a framework. The old method here has been to...

0
Q: Smarty Template Variable inside Variable

user2699703I have text this stored in my database: Your email is: {$email} and your name is {$name}. $text = get from db this field; I read this field from the database I assign with smarty this: $smarty->assign('text', $text); $smarty->assign($name, 'maria'); $smarty->assign($email, 'maria@email.it')...

0
Q: Web page change when left or right arrow in keyboard pushed

user2924643i want to ask how can i change the web page when the arrow key pushed by user , like a web of manga/book if we want to next page we just push the arrow key sorry for my english , thanks before

0
Q: Remove carriage returns in text column during MySQL query in PHP script

Rocco The TacoI'm selecting a text column in a MySQL query for export to a csv file in a PHP script. It turns out the text column has carriage returns which is causing an issue with import on the other end. How do I remove carriage returns while making the query and just present the text? Here is my curre...

0
Q: How to join values from a nested table value from mysql database

Peter ReginaldHi folks I'm learning how to code (php and mysql) by following online tutorials and am building my first website from scratch. I am stumped with a problem and I don't know the best search keywords to get results in google. I hope someone can help. I am familiar with the "SELECT ... FROM ... JO...

-2
Q: PHP Framework decision for specific project

michiI'd like to get some experience-based suggestions for choosing a PHP framework for a specific project. The Project is a web-app for collecting data from users (patients), evaluating and presenting this data to another group of users (medical doctors, nurses etc.) data is collected via HTML for...

0
Q: Yii- finding whether a value is present based on another value

user2770039I'm new to Yii framework. Now, I have a form with two textfields FieldA and FieldB, where I need to check whether the value of FieldB is already there for value of FieldA. Suppose value of fieldA=123 and value of fieldB=345. If the value of fieldB is repeated for that value of fieldA, then error ...

0
Q: How to display exact date difference in php

NeerajMy Question is Little bit tricy . i have to display date difference. (i find out date difference in terms of 2 year 7 month 3 days 5 hrs 30 min.) Now how i display upto exact 2 higher values please consider given case case 1 : date difference is 0 year 2 month 21 days 7 hrs 30 min output m...

0
Q: How is Joomla HTML generated

user2620883I hardly know PHP but I'm fluent with HTML/CSS and I want to know where can I insert the new div or id to the element so as I could manage the display more properly. I tried to google "joomla html generation" but was given irrelevant search results

0
Q: Setting Background color in wordpress for bizway theme

Puseletso MichelleI have a static website and I want to set the background color for the whole website to black,am using wordpress on windows azure,i have tried searching but no solution that could help me. Any one who has a suggestion the link to the site : http://hairimpressions.azurewebsites.net/ Thanks in a...

0
Q: PHP preg_split search misses first word

JamesI'm using preg_split to find some results and it works great except (oddly) on the first word. For example, if there is an item called "phone blue" and I search for "phone random" I get nothing, however if I search for "random phone" (or "something ph", "something phone random", etc) it finds "p...

0
Q: wp-fb autoconnect- user not registering

AbhiHi, I am new to wp-fb auto connect. As per documentation I unzipped the plugin folder and installed the plugin(3.0.1) successfully with fb app id and secret id and also added the auto connect widgets to the sidebar. But after login with facebook credentials it is not registering any user in my ...

-1
Q: How to send database file to the user?

Ajeet ManralI have a database file database.db that i need to be send to the user when a request is generated for the database. I am a newbie and I Have no idea how can I send my database file to the user using php. Any idea or help will be very much appreciated.

0
Q: Laravel getting highest four objects from their attribute value

FrozireI have been trying to get the four highest objects based on an attribute in them. I can succesfully get the one with the highest value by doing the following: {{ Bid::where('auction_id', '=', $auction->id)->max('bid_amount') }} Which gets the max value of my bids bid_amount. Now I could pote...

0
Q: Upload file with IFRAME, the file don't get to the server

user2961797Following my code: HTML: <form id="test" action="javascript:test()" method="post"> <input name="image" type="file" /> <input type="submit" value="Submit" /> </form> JS: function test(){ iframe = document.createElement("IFRAME"); iframe.name = "iframe_upload"; iframe.src="test.ph...

-1
Q: Contact form: 401 - Unauthorized

TristanD27I am creating a contact form for a website but when I try a test message I am getting this error: 401 - Unauthorized: Access is denied due to invalid credentials The website is: http://zimik-webdesign.com/contact_us.html Here is the PHP: <!doctype html> <html> <head> <meta charset="utf-8"> <title

0
Q: How to define a new source_model for magento customer?

noedenI am new to magento and want to set the store view after login depending on the user. The user can select a store view at registration and this is stored as an EAV attribute in the database. My install script: <?php $installer = $this; $installer->startSetup(); $setup = Mage::getModel('custome...

4
Q: Recursive generators in PHP

Alma DoSO, Introduction Since version 5.5 in PHP there's such great thing as generators. I will not repeat official manual page, but they are great thing for short definition of iterators. The most-known sample is: function xrange($from, $till, $step) { if($from>$till || $step<=0) { throw...

0
Q: How do I apply css to iframe where the src is PHP?

user2964374I want to apply css to a piece of php code that my html page calls as an iframe: <iframe src="http://ktibclaims.co.uk/claimStats.php" frameborder="0" width="850" name="frame1" style="color:#ffffff;" ></iframe> I have control over the php file but am not a php programmer. All I want to do is fo...

0
Q: Send a File Directly for Printing

Coder GuyI have an app to make and the basic idea is that a client sits on the master computer whilst a server on the other. You drag and drop a file from one of the child computers, enter the number of copies and send it. (VIA TCP) it is received on the other end and printed. The problem I am facing is ...

0
Q: Doctrine - many to one; Populating many, can't use the constant "ones" on the DB. How to insert manually the FKs?

user2963860I have the following model: class Word{ ........... /** * @ManyToOne(targetEntity="Language", cascade={"persist"}) * @JoinColumn(name="language_id", referencedColumnName="id") */ protected $language; .......................... } class Language{ /** * @Id * @Co...

0
Q: Joomla 3.1. Pull data from database

Garik ArzumanyanI want to pull data from MySQL. I try this <?php $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select(array($db->quoteName('total_amount'))); $query->from($db->quoteName('money')); $db->setQuery($query); $results = $db->loadResult(); ?> <?php echo $results; ?> but it ...

0
Q: Reverse vsprintf PHP

user488074I'm making classnames according to an array which contains for example $ar = array('view'=>'%sView') and constructing classnames with vsprintf($ar['view'], 'foo'). This will turn into fooView Now I want to extract which format is being used by reversing it. Pseudocode: reverse_vsprintf('fooView'...

1
Q: change HTTP_REFERRER using php before redirecting

baibav kumarI have a script which redirects to an link like header("Location:http://foo.com/abc.xyz"); but I want to either set the HTTP_REFERRER to be http://foo.com or blank so that the site http://foo.com can not track that the reference was sent from another domain in which script is installed.

0
Q: Checkbox Value If name is dinamyc

pzoli89I have a list of checkbox generated from database: foreach($array as $value){ echo '<input type="checkbox" name="t' . $value . '" value="0"/>'; } Question: How can I get the values of these checkboxes? I tried in this way: foreach ($array as $value) { $perm = $_REQUEST["t$va...

0
Q: Cakephp routing rule like .htaccess

Mateusz ZającI want to erase and clean my code a bit. I have this rule in .htaccess RewriteRule ^(.+),(.+),(.+),([0-9]+).php$ /hotels/description/$4/3 RewriteRule ^(.+)+(.+)-([0-9]+).php$ /hotels/description/$3/4 RewriteRule ^([0-9]+).php.*$ /hotels/description/$1/1 RewriteRule ^([0-9]+).htm.*$...

 
12:29 PM
0
Q: Magento how to generate PDF preview images using imagick

user2485618i need to know in Magento how to generate PDF preview images using imagick? Please ,any body answer this. Thanks in advance ..

0
Q: Dependent List dropdown in user profile of Joomla

Alien2828I'm using Joomla 2.5 for my website and I want my user to register to the register form where I also want them to register the place. I have two drop down State and City. when State is seleected, based on this, City dropdown gets value from the database. I have added two SQL fields to the profil...

0
Q: signout from facebook session

cyclicMy login page is 'login.php' if he successfully authenticated then new page is redirect i.e. star.php I want to keep signout button on start.php. <input type="button" value="logout" onclick="setTimeout();" /> <script> var userid; FB.init({ appId: '178812',...

0
Q: Laravel 4, Multiple Polymorphic Relations from one Model

JoeI'm trying to set up polymorphic relationships in Laravel 4 so that I can have one Image class which handles everything related to uploads, unlinks and so on, then have it used by multiple different Models. That's fine, until I get to trying to create multiple links from the same Model. For exam...

0
Q: PHP regxp password validation seeking explanation

DanielYo all, So i am learning regexp :-) yay I am learning how to parse password strings that have to have 1 capital letter and 1 number atleast, and can be between 6 to 12 chars long. Im having troble understanding this. $array = array("Hallo1ween23"); $match = preg_grep('%^(?=[-_a-zA-Z0-9]*?[A...

0
Q: Image upload into database issue

Zsigovenywhenever I want to upload the picture it just outputs ' there is an error' from the code statement . I also tried sprint but it does not work. What can be the problem?????????????????????????????? Thanks in advance.! <html> <body> <form enctype="multipart/form-data" method="post" action="i...

0
Q: FInd rss using php from all tabs of a website

user2964771I have a php code to find rss links from a URl, It is workin fine, site is having different tabs and each tab contains an RSS feed, how do I modify my php code to check all tabs of the site and get rss feeds from it. Here is my code: <?php $location = 'http://timesofindia.indiatimes.com//'; $ht...

0
Q: The need to click back buttons twice in IE - what's up?

Carpenter616I'm using the bellow code for my back links: <a href="<?php echo $_SERVER['HTTP_REFERER'] . '#' . $post->ID;?>" title="Back" onclick="history.back(-1); return false;">Back</a> <!-- <a href="<?php echo $_SERVER['HTTP_REFERER'] . '#' . $post->ID;?>" title="Back" onclick="javascript:window.hist...

0
Q: how to hide a text field in js?

user2809576i want to hide the text field when i select from the list item2 from list. showing below is the part of my code: <div class="control-group"> <label class="control-label">Select Parent</label> <div class="controls"> <select name="parent_id...

0
Q: Classes autoload using namespaces for parent and children

Ir0nmI read several articles about using namespaces in php but I didn't get it yet. I have 3 files: script.php and dog.php are located in same root folder, abstr. class animals.php is located in cls folder, and dog extends animals. Sources: cls/Animals.php: namespace cls; abstract class Animals { ....

0
Q: Output Buffering with PHP Headers

ZachI am attempting to create a vcard from data within a WordPress install (WP part I'm assuming is inconsequential). I am calling the file with a URL param like /inc/vcard.php?vcard=664 and have the following code so far: <?php ob_start(); define( 'WP_USE_THEMES', false ); require_once( $_SERVER['...

0
Q: how to create a dynamic drop down list from another drop down list selection

user2964800how to create a dynamic drop down list from another drop down list selection using PHP and JQuery ? the other drop down list is getting the values from mt DB/

0
Q: list records where ID's match from two sepate tables

Luke Nichollsi have two tables in my database, one (table 1) which is for users which includes: ID, firstname, lastname, login and password. the other table (table2) has the data in it, which also has an ID field. i want to know how i only display the data in table 2, when the ID of table 2 = the ID of table ...

0
Q: hybrid auth working with Facebook and twitter, but not google

user1949366I am using hybrid auth to assist users when signing in and registering. I have never used this before so wanted to do a simple test to see how to get user information. Using this snippet I am able to pull various details from twitter and facebook with no problem, however when changing the provide...

0
Q: Set character set and convert to utf-8 without bom

xoemabWhen I using $file = fopen($destination,'r'); to read file everything works correctly but if my file have cyrillic, greek etc. letters then the letters are like that Ονομάζομαι Όλιβερ Κουίν. In Notepad++ you can do that by going Encoding-->Character Sets-->Greek-->Windows-125...

0
Q: Error in $_SERVER['HTTP_REFERER']

baibav kumari just tried echo $_SERVER['HTTP_REFERER']; but it returned an error Notice: Undefined index: HTTP_REFERER in C:\Program Files\.... What is the problem an why is it showing an error.

0
Q: Fatal error: Call to a member function bind_param() on a non-object

VeeYik PongThis is part of my code $con = mysqli_connect("localhost","root","","baspdata",3306); if (mysqli_connect_errno()) { echo "Error connecting to database: ".mysqli_connect_error(); exit(); } else { $result=mysqli_query($con,"SELECT * FROM member WHERE Username='$username' and Password = '$passwor...

0
Q: php show event if server date/time is between two time values

Brad J TrammellI'm not trying to do this with MySQL as I see is common. I am merely trying to create a PHP Script that will display information like this using the servers time and date as a reference: Monday 2:30am to Tuesday 2:29am - Content A Tuesday 2:30am to Wednesday 2:29am - Content B Wednesday 2:30am t...

0
Q: Canno't use fnAddData when table is empty

user2688870I'm using a table with the jquery dataTable plugin. When I use the function fnAddData it works, except when the table is empty, then i get this error : Cannot read property 'className' of undefined This is how I add my data $("#table-1").dataTable().fnAddData([ data[0], ...

0
Q: Doctrine2 - How to query for referenced documents in MongoDB

Rafael AdelI have two collections, categories and jobs, the jobs collection is referenced inside categories. Now i have in CategoryRepository a method called getWithActiveJobs(), This method returns all categories with referenced jobs that only not expired and activated. The problem is when i run this ...

0
Q: Webmatrix Access denied for user ''@'localhost' (using password: NO)

user2161721I have a problem with a mysqli_query in this code: <?php session_start(); $user = $_POST['user']; $pwd = $_POST['pwd']; include "connect.php"; if ($user && $pwd){ // infos provided $queryget=mysqli_query("SELECT * FROM Tmembers WHERE user='$user' AND pwd='$pwd'"); $numrows...

0
Q: upload file with php

dole dougI'm using plupload to upload files to my webapp. I need to upload some xls files but upload fails for some of them. I have no ideea why the upload fails, but I get an error on move_uploaded_file. I don't now why some upload files are not working. In the following are snippets of my code. var u...

0
Q: How to overlay image on other one with transperent effect usin HTML-CSS

user2818537I want to overlay one image on other using CSS-PHP. Please see the below HTML and CSS snippet and give ur wise suggestions: The images are present in header part of the division: j_logo.jpg and MMPHero3.jpg. Of which former should be transparent and in left container while later one should occupy...

0
Q: Multiple select from pages

user2963430I am using a code that reads pages from the database. It runs on PDO, PHP. Anyways I am wondering how would I make it so it reads from two tables? As if for example, at the current time it runs off 'pages' but could I make it also read pages from 'pages_default'. I dont mean as in it only display...

 

« first day (261 days earlier)      last day (49 days later) »