Hallo,
I display profiles from a table on a page.Each profile has an id and each profile can also be contacted with the link "Contact this person".
When somebody click on this link a new window(contact_form.php) is opened, where the user can enter his name, email and description.When the user submits this form, I save all the information into a table.
I have done upto here and everything is working fine.
Now, my question is How can I capture the profile id?? , say if the user has contacted the first profile, i would like to store this profile id no.
You can view my example page HERE
I only see the problem is that the profile id is not being sent properly, How can i do this one??
ess.php is the form which displays all the profiles and this part of the code is the one which is troubling me.
and in contact_form.php , i have this code:
and now email.php is the one which executes my sql query and it looks like:
Sorry for the lengthy post, just trying to explain it clearly so that somebody would fix it easily.
Thanks
I display profiles from a table on a page.Each profile has an id and each profile can also be contacted with the link "Contact this person".
When somebody click on this link a new window(contact_form.php) is opened, where the user can enter his name, email and description.When the user submits this form, I save all the information into a table.
I have done upto here and everything is working fine.
Now, my question is How can I capture the profile id?? , say if the user has contacted the first profile, i would like to store this profile id no.
You can view my example page HERE
I only see the problem is that the profile id is not being sent properly, How can i do this one??
ess.php is the form which displays all the profiles and this part of the code is the one which is troubling me.
PHP-Code:
// I think here i need to add id field and this id has to be passed to contact_form.php as well as to mail.php, right??How should i?
echo '<a href="javascript:';
echo 'openWindow(\'contact_form.php\',\'\',\'toolbar=no,status=no\',\'724\',\'470\',\'true\');">Contact the Person</a>';
PHP-Code:
<form name=form method="post" action="email.php">
and also
<td width="100%"><input type=button value="Submit" onclick="verify();">
</td>
<input type="hidden" name="id" value="<?=$HTTP_GET_VARS['id']?>">
PHP-Code:
$query = "insert into $mytable (name, email, text, contacted_id) values ('$name','$email','$description','$id')";
$result = mysql_query($query);
Thanks
Kommentar