Greetings learned PHP(eople),
Scenario : User fills in text box, pushes Submit and textbox data gets
passed to MySQL database..
=============================================
The code from the HTML page :
<form action="savemail.php" method="GET" target="main">
<input type="text" class="mailinput" name="mailaddress" value="Your
Email Address">
==================================================
The code from savemail.php :
<?php
$result = @mysql_pconnect('localhost', 'user', 'pass');
$query = "insert into email values ('" . $_REQUEST['mailaddress']
. "')";
//Error stuff-------------------------------------------------
$ResSaveMail = mysql_query($query);
if (!$ResSaveMail)
{
echo("<P>Error performing query: " . mysql_error() . "</P>");
echo("Your email has not been saved to the Delta Database.");
exit();
}
//------------------------------------------------------------
?>
=======================================
THe problem :
The variable 'mailaddress' is not getting passed to savemail.php
echo $_REQUEST['mailaddress'] reveals blank....
On another programmers advice I tried using POST in my form, but that
don`t work either..
The database is getting populated with blank values...is my problem in
the php code somewhere..I been playing with this for a while now and no
joy has yet surfaced..
Any ideas greatly appreciated...
--
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
Then there was the Formosan bartender named Taiwan-On.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php