39,326 Topics
| |
Hi, i have a question about php functions when using arrays. I have the following task to do: 1.Create a Php array $months which contains the months of the year, “January”, “February”, “March”, … “December”. 2.Create a Php function called echoArray() which accepts an array as a parameter and uses … | |
I have searched everywhere for this, but I'm really not certain we would all describe the symptoms the same way. It is most bizarre. I set a random hash string (doesn't mater how - I don't believe - but I will post code below), store it in a hidden form … | |
echo "<td><a href='delete.php?user_id=".$row['user_id']"' onclick='return confirm("Do you want to delete?")' >DELETE</a></td>"; I am not being able to correct it... | |
<?php // Set up the database connection $dsn = 'mysql:host=localhost;dbname=lafamosa_plaincart; $username = 'lafamosa_kermis'; $password = 'lafamosa1980'; $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION); try { $db = new PDO($dsn, $username, $password, $options); } catch (PDOException $e) { $error_message = $e->getMessage(); include('errors/db_error_connect.php'); exit(); } ?> Parse error: syntax error, unexpected T_STRING in /home/lafamosa/public_html/dene/model/database.php … | |
| Hello all, I have a drop down that is populated using php and mysql. when the user makes a selection, I run the function showUser(), however, nothing happens when i make a selection, can anyone help with what I'm doing wrong? The JS [CODE] <script type="text/javascript"> function showUser(str) { if … |
hi everyone got a problem with the pp api... basically i have a return url that gets 2 fields from the pp form.. custom and mc_gross. the problem im having is that when pp redirects to this function, it first goes to a page stating its going to redirect in … | |
Hi, I am looping the data and displaying it from the database. But only one data set is displaying in the loop. I dont now where i am doing wrong. Here is my code. Please help me $resultViewed = $this->model_report_product->getMostViewed(); $stringResult ="var data= google.visualization.arrayToDataTable([ ['Product', 'Views'],"; foreach($resultViewed as $results) { … | |
i want that after validation of form with ajax it will be redirect on another page but my coding is showing result in specfic div id=result . i am getting result on index.php which coding is following <div class="c_right"> <div> <div class="t_h_c"> Hi Guest </div> <div id="result" class="error"> </div> <div … | |
Hi.. I want to run a php file every 5 seconds. So that i used shellscript file. But Shellscript file not accept php coding. Can i include php file into Shellsript file? or can i write the php code in Shellscript file? | |
I'm new to PHP and currently i face some problem in error as below Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING Below are my code. Appreciate if someone can help to point out the error and some suggestion Thanks a lot!! while($row = mysqli_fetch_array($result)) { … | |
i want to send sms with php , how its possiable tell me in detail | |
I want to have a list of months and years when content was posted to my website. Example: /// **Archive** *July 2012 June 2012 May 2012 April 2012* /// Then, clicking one of list items takes you to a page with every post from that month. I know I should … | |
hi all, i just want to ask if its possible to have a two or even more database connection in a php run application like db_connect---db1 fetch data db_connect--db2 fetch data db_close --db2 if its not possible. how can i get data from other database table appriciate youre answers. | |
Hi, Is there a function that will express any given number in words. For example: if number is 1432 then this function should echo "One thousand four hundred thirty two". Thanks | |
Hi Guys I am currently working on an image upload script. i want to log user upload and record their ips. I worked on a script(its works) but i am not sure if it will be 100% reliable. Here is code that i though of <?php $ip = $_SERVER['REMOTE_ADDR']; $filename … | |
| Hi, I'm having an trouble trying to printf the string. <?php $product_name = "pencils"; $product_price= 7.99; printf( "Product %f will cost %1.1f dollars.", $product_name, $product_price ); ?> The answer should look like this **Product pencils will cost $7.99 dollars** but instead it looks like this **Product 0.000000 will cost 8.0 … |
My question requires a little background first: I'm working on a Web project where there are four theatres owned by a single company, so not only will the four theatres each need their own Website (each with its own unique branding), but the umbrella company will need one as well. … | |
Hi all! Qick question, I have this variable below and I'm wondering if it's possible to Exchange the text in <th>Totalt</th> with a varible instead i.e. <th>$Totalt</th>? I couldn't figure it out? :-/ $table1 = "<div id=\"container\"><table id=\"table-3\" cellspacing=\"0\"><thead><tr><th>Totalt</th><th>Totalt</th><th>Benchmark</th><th>Differans</th></tr></thead><tbody>"; Should be simple enough, right... Peace Adam | |
I want to make my own email portal as a project. How can I make it? Please help me... I need to compose mails and send these mails to different persons (including attachments). I also need to make inbox, outbox, drafts etc. for processing my mail. How can I make … | |
Hi, I am looking for some help in adding a calendar to a form that i am building. Its much like a calendar when you book air tickets.. click on a calendar like icon and a pop up window opens select date year and month the details get into the … | |
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 'LIMIT 1' at line 2 I m getting this error while entering my query in the php code.. my code is function get_subject_by_id($subject_id) { global … | |
i have a forum for uploading pics or other files to a root folder but its not working online on my hosted domain at jnetscripts.com it sais its working but no file is there, i chmod the folder root to allow writing and still does not work is there a … | |
<form enctype="multipart/form-data" action="upload_file.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" name="submit" value="Upload File" /> </form> <?php // Where the file is going to be placed $target_path = "uploads/"; /* Add the original filename to our target path. Result is … | |
i have a little problem in my website, i dont know where is the problem. i am create link of other website in my website by using this code $output .= "<b>Website: </b><a href='".$row["website"]."' target='_blank'>".$row["website"]."</a><br>"; but when i click on a website it does not open website. when i check … | |
Currently i'm working on my own php-mysql with zend website project, i don't have to much time to work on developing my own cms so i am going to use TOMATOCMS - http://www.tomatocms.com, and nearby three months are required to develop my own, and after that i want to switch … | |
I have a problem in a payment solution I have made. In this, I use ereg to extract a returned Transaction ID from the payment provider, and with PHP 5.3 this does not work anymore. The code used was: ereg('<TransactionId>(.+)</TransactionId>',$resultat_3,$c); I have tried to use this instead: (but it doesn't … | |
I have only coded 2 sites till now, first one in plain php (wall of php intermingled with js, html , super messy) and the other in codeigniter(much better as far as separating display with logic is concerned) now I have to code a website for a friend (designer). The … | |
<br /> <b>Notice</b>: Undefined variable: firstname in <b>C:\xampp\htdocs\dl\index.php</b> on line <b>70</b><br / | |
Hi I am using PHP to develop a web application. I want to send a mail report automatically from the server, without any user interaction. I tried in cron but not properly worked in my application. Is there any other way to send aoutomatic mail from server. Any one can … | |
Hi... I want to send a mail automatically using cron job. Till i searched about that, there is only how to set the time and path of the file in cron folder. But i want to know about how it will run? |
The End.