Hello again
On my site i want people to be able to click a link which will take them to the page where they can enter their URL and click submit.
This should then be shown on another page.
I know how to connect to the database and select the database but i am having problems with the form and inputting the data.
The form looks like this
<FORM ACTION="<?php echo($PHP_SELF); ?>" METHOD=POST>
<P>Type Your Link Here:<BR>
<input name="LinkText" type="text" value=""><BR>
<INPUT TYPE=SUBMIT NAME="submitlink" VALUE="SUBMIT">
</FORM>
but when the submit button is pressed it jus takes you to my home page index.php
this is also the code i have for inserting the data
<?PHP
if ("SUBMIT" == $submitlink) {
$sql = "INSERT INTO Links SET " .
"LinkText='$Linktext', " .
"LinkDate=CURDATE()";
if (mysql_query($sql)) {
echo("<P>Your Link has been added.</P>");
} else {
echo("<P>Error adding submitted Link: " .
mysql_error() . "</P>");
}
}
?>
I check the database after i have submitted my link and there is nothing there!!
Any suggestions/Help
Thanks
Kane2oo2