Re: problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ahmed, 

You didn't say if you are using POST or GET for the form or the version
of PHP that you are using. Please email us the version of PHP and the
HTML for the form that you are using if the suggestions below don't
work.

But basically, the problem is that the data from the form are elements
in an array called $_GET or $_POST for a GET and Post method
respectively.

You need to alter you code to resemble something like
$name = addslashes($_GET["name"]); #if using a Get form method
or 
$name = addslashes($_POST["name"]); # if using a Post form method

instead of 
$name = addslashes($name);


Change the rest of the code to suit.


You could also try adding 

phpinfo(INFO_VARIABLES);

 to see what you are
really getting from the form.

George Patterson

On Mon, 5 May 2003 03:06:05 +0300 (Egypt Daylight Time)
"Ahmed Abdel-Aliem" <ahmed_abdelaliem@hotmail.com> wrote:

> hi again,
> i use php/mysql and i have a form to enter data into tables inside
> the database
> the problem is when i click the submit botton it gives me that 1 row
> is affected and when i check the database with phpmyadmin i find that
> all the data processed in the new row is empty, so can anyone please
> tell me where is the problem?
> here is the insert script :
> <?
> $name = addslashes($name);
> $type = addslashes($type);
> $date = addslashes($date);
> $link = addslashes($link);
> $cds = addslashes($cds);
> $rate = addslashes($rate);
> $cast = addslashes($cast);
> $downloader = addslashes($downloader);
> $downloaderlink = addslashes($downloaderlink);
> @ $db = mysql_connect("localhost");
> mysql_select_db("egycds");
> $query = "insert into newdvd (name, type, date, link, cds, rate, cast,
> downloader, downloaderlink, subtitle) values ('".$name."',
> '".$type."', '"$date."', '".$link."', '".$cds."', '".$rate."',
> '".$cast."', '".$downloader.', '".$downloaderlink."',
> '".$subtitle."')";$result = mysql_query($query);
> if ($result)
>  echo mysql_affected_rows()." affected.";
> 
> ?>
> 
> 
> 
> 
> 
> i use ISS on windows xp professional and i face many problem with
> php.ini so can anyone send me a modified one for the last version of
> php to avoid all these errors !!

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux