39,320 Topics
| |
hello i want if enter account save in database :) this is my code , but it's not save anything in database :"( i don't know why ! i have database "accounts" have "2 row name & account" <html> <body> <?php $con=mysql_connect("localhost","root",""); if(!$con) { die('can not connect'.mysql_error()); } mysql_select_db("scms", $con … | |
Hi all, Here is all my code for processing a form. Having trouble with the last else statement. The error is saying it is not expecting that last else!! Sorry for all the code, but I thought I would put it all in here. Could somebody please let me know … | |
I am trying to append the code to display the results of the database by including a link, I got the link to work, but it will not display the results when clicked. Below is the code, If you can help me that would be great! Thanks <?php //if we … | |
Hello allheres what im trying to do scrape a page for data between two words ,reformat it as a link and then follow that link to get the final info i want ..all works fine till the second part comes into play--following the link here is my script which produces … | |
Hi everyone, I am getting the following error message on a script page I have. The error is Parse error: syntax error, unexpected T_IF in blah blah blah on line 432 if($paypal != '') { $qry = "SELECT * FROM tbl_name WHERE var='$paypal'"; $result = mysql_query($qry) if($row=mysql_fetch_array($result)) { // this … | |
I programming a ecommerce website where users can add products to a cart and then use a paypal checkout button to process the order. I've been trying to figure out how I would let the user add stuff to a cart and not force them to login to their account … | |
How do i insert this into my sql database? I have tried a few things like putting the array bracks on the upload file. when i do this it saves the image location but doesnt upload the image. This is my upload snippet for ($i=0;$i<4;$i++) { if($_FILES['userfile']['name'][$i]) { $uploadfile = … | |
Really really need help with this one! I need to convert from php to mysql so that it reads language information from mysql, i made mysql table already but I just don't know how to change from php to mysql <?php session_start(); header('Cache-control: private'); if(isSet($_GET['lang'])) { $lang = $_GET['lang']; $_SESSION['lang'] … | |
<?php include('./phplot.php'); $graph =& new PHPlot(); $example_data = array( array('a',3), array('b',5), array('c',7), array('d',8), array('e',2), array('f',6), array('g',7) ); $graph->SetDataValues($example_data); $graph->DrawGraph(); ?> When ever I run this program I get an error ! `The image "http://localhost/test.php" cannot be displayed because it contains errors.` I also have GD library enabled! What is the … | |
Hi all I would like to display several charts on a webpage. I have designed a class that would draw each chart using GD and based on data set by a public method. Unfortunately instead of charts being drawn I get an error message: The image ... cannot be displayed … | |
Hi. I'm a newbie in php, and I recently bought a book called PHP and MySQL Web Development by Luke Wlling and Laura Thomson. I was able to make an order form in Chapter 1, but in Chapter 2, I have to process orders so that every time I fill … | |
hi, i found below online 00 11,16 * * * /home/ramesh/bin/incremental-backup i understand that it does 00 – 0th Minute (Top of the hour) 11,16 – 11 AM and 4 PM * – Every day * – Every month * – Every day of the week but what i need … | |
Hi I am trying to allow users to update records in a MySql database through php forms. One problem I am having is with a drop down field for dates. I want to echo the date already in the database so that the drop down menus is set to that … | |
Hi All, I am having contsantly getting the following error: PHP Fatal error: Out of memory (allocated 4295491584) (tried to allocate 8589934593 bytes) the line its complaining about is as following hilighted in bold: [code]<?php $link = @sybase_connect('****', '***', '****') or die("Could not connect !"); echo "Connected successfully"; $sql = … | |
Hi, I have this expression in my code: if (($a % 0.005) != 0) { ... } Tehnically i'm just checking modulus. However, i get division by zero warning all the time. Why that happens with this expression? The value 0.005 is not zero. The variable $a can get all … | |
Hi I am trying to run a query where the user enters a number, and it searches the table for it and displays any results within 50 of that search. e.g. user searches for 500, anything from 450-550 would be shown. I have the code for showing an exact result … | |
hi all.. i have a problem. Actually i want to view respond select by MAX(tran_id)...don't know why when i run this code, i do not get the max/ last respond.. it return to me the first respond..for the tran_id it view the max id but not for respond..here the script..hope … | |
I had this code but now I need to change it to newer preg_replace function Can someone help me to do it please? Here is the code: $newString = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>", $originalString); Thanks in advance. | |
hi everyone, I am looking into a small problem I have with a mysql database. At the moment users can upload upto 4 images per item. I am using php to display the images from the database, but if a user has only uploaded 2 images I am getting empty … | |
Hello, Many guys have been asking for this sort of sms scripts! Any way i have created one for personal use but i am sharing here :) Things you need [LIST] [*]An Account in tm4b.com and PHP 5. [*]cURL or allow_url_fopen enabled in php.ini [/LIST] - [URL="http://jhbalaji.com"]Balaji J H[/URL] | |
| So I have not found a real answer to this yet. If you know asp.net you know what I mean. I need to make nested template for my website so that it remains consistant through out and certain sections change on different pages. How can I do this? Whats the … |
I want to allow registered members to upload files to the file system I have two mysql tables members for registered users and a table files to have a trace which member uploaded which file. now, I only would like to allow the upload of PDF's to the file system. … | |
Hi folks! I got a little problem with my assignment. The idea is to create online bookstore. As far didn't have much troubles with the project, until now. Problem occures when I'm trying to update/delete an entry to mySql. if you take a look at line 93 - there is … | |
I want to ask something. I don't understand how to get same data from table at only one time. Here are the example Like table name product_data and there are atleast six field. in data field the date look like this product Date 23-04-2012 23-04-2012 23-04-2012 23-04-2012 23-04-2012 23-04-2012 18-04-2012 … | |
<?php include("include/dbc.php"); include("include/connect.php"); session_start(); $error="style='display:none;'"; $submitcheck=$_POST['submit']; if($submitcheck==1) { if($_POST){ $user_name=addslashes($_POST['user_name']); $password=addslashes($_POST['password']); $query1=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='1'"); $query2=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='2'"); $query3=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='3'"); $query4=mysql_query("SELECT * FROM … | |
Hi, I have an array and I want to check if the student id exists in it or not **without** looping the array. I tried `in_array` and `array_key_exists` but they didn't work. If **001122334** exist in array below then **echo exist**. Thanks in advnace Array ( [0] => Array ( … | |
I would like to find out if my code is correct. It doesn't look right to me. The code is in response to part of an assignment which asks 3 things: 1. Create Model Class file "booksmodel.php" i.e. "BooksModel". 2. Add public method called save_books() to model class. 3. Accept … | |
| i have site divided into about 5 pages , sometime when i make changes then i have to update all five pages. so i want to know if i make file like template.php and then i divided my pages major portion to parts like header.php, body.php , footer.php and sidebar.php … |
I am looking to use mod_rewrite to remove the file extension of the files on my site. I am aware of how to make use of the mod but I was curious as to a couple of things when passing variables to a script. Such as if I have a … | |
Hi everyone, I have a strange thing happening when I update my form. On the form there are a number of input fields, item cost,item name, item description. If I update the item cost, this updates without any problems, but it also updates the item description, duplicating the description. The … |
The End.