I am trying to embed the value of one field into a link placed in another field within the same table.
Any help would be GREATLY appreciated.
[CODE]
[COLOR=”red”]process.php[/COLOR] (the form processing code)
<?php
$UserID=$_POST[‘UserID’];
$Link=$_POST[‘Link’];
$UserNumber=$_Post[‘UserNumber’];
mysql_connect(“[COLOR=”Red”]localhost[/COLOR]”, “[COLOR=”red”]username[/COLOR]”, “[COLOR=”red”]password[/COLOR]”) or die(mysql_error());
mysql_select_db(“[COLOR=”red”]databasename[/COLOR]”) or die(mysql_error());
mysql_query(“INSERT INTO [COLOR=”red”]tablename[/COLOR] (serID, Link, UserNumber)
VALUES (‘$UserID’, ‘$Link’, ‘$UserNumber’)”);
Print “Your information has been successfully added to the database.”;
?>
[CODE]
[COLOR=”Red”]index.php[/COLOR] (form code)
<FORM ACTION=”[COLOR=”red”]process.php[/COLOR]” method=”post”>
Your User Name: <INPUT TYPE=TEXT NAME=”UserID” SIZE=20>
<INPUT TYPE=HIDDEN VALUE=”<a href=[COLOR=”red”]’http://link[/COLOR]=[COLOR=”Lime”]$FriendID[/COLOR]’ target=’_blank’></a>” NAME=”Link” SIZE=250>
<INPUT TYPE=HIDDEN VALUE=”1 ++” NAME=”UserNumber” SIZE=20>
<INPUT TYPE=SUBMIT NAME=”SUBMIT” VALUE=”Submit”>
</FORM>
[COLOR=”lime”]What I think the problem is
[COLOR=”Red”]Edited for security
I just need help embedding the User ID into the link that is stored in the “Link” Field. Thanks in advance! Derek.