Forum Moderators: coopster
<form method="post" action="addemail.php">
<input type="text" name="address">
<input type="submit" value="submit">
</form>
addemail.php contains:
<?php
$sql="INSERT INTO table set email='$address'";
if (mysql_query($sql)){
echo("added");
};
When i submit anything it just adds a null value to the database.
if i surround $address with other charcters, these get added but the actual $address is ignored.
any ideas?
thanks
Did you try the little snippet to see if it worked?
Using Register Globals [php.net]