here the error message:
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 3 in /home/vsrafd2/public_html/Roster/apply.php3 on line 30
and my code
<?php
print "<BODY BGCOLOR=\"#CCCCCC\">";
$DBhost = "localhost"; /* DON'T CHANGE should be fine as it is ok*/
$DBuser = "**********";
$DBpass = "****";
$DBName = "********";
$table = "pilotinfo"; /* DON'T CHANGE*/
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db($DBName) or die("Unable to select
database $DBName");
$name = $_POST['name'];
$email = $_POST['email'];
$age = $_POST['age'];
$history = $_POST['history'];
$webaddyhist = $_POST['webaddyhist'];
$role = $_POST['role'];
$comments = $_POST['comments'];
$registered_on = gmdate("l d M Y");
$registered_at = gmdate("H:i:s");
$regcode = md5(uniqid(rand(),1));
$sqlquery = "INSERT INTO $table values ('$id','$visible','$name','$email','$age','$history','$webaddyhist','$role','$comments',0,'$registered_on','$registered_at','$regcode')";
$results = mysql_query($sqlquery);
$idquery = "SELECT id FROM $table WHERE regcode='$regcode'";
$results2 = mysql_query($idquery);
$pid = mysql_result($results2,0,"id");
####################################
#confirmation e-mail settings Below#
####################################
$subject = "New V-RAF.co.uk Registration";
$message = "A New User Has Registered
here's the information they submitted:
Name: $name
E-Mail: $email
Age: $age
History: $history
Web address or e-mail of previous Site or CEO: $webaddyhist
Role: $role
Comments: $comments
They registered on: $registered_on
They registered at: $registered_at
Before you appear on the roster and before you can file pireps you are required to activate your account to do so please click on this link to activate your account http://www.v-raf.co.uk/activate.php?code=$regcode&id=$pid
May i thank you again for joining us here at easyJet Virtual
Daniel Hill
CEO
If you recieved this e-mail in error please delete it.
PLEASE DO NOT respond to this e-mail as it is an automaticaly generated e-mail.";
$headers = "From: SOME EMAIL ADDRES HERE";
$mailsend = mail($email,$subject,$message,$headers);
#####################################
#End of confirmation e-mail settings#
#####################################
mysql_close();
print "<HTML><TITLE> PHP and MySQL </TITLE><center><table border=\"0\"
width=\"500\"><tr><td>";
print "<p><font face=\"verdana\" size=\"+0\"> <center>You
Just Entered This Information Into the
Database<p><blockquote>";
print "Name : $name
<p>
E-Mail : $email
<p
age : $age
<p>
History : $history
<p>
Url of previous VA or E-Mail address : $webaddyhist
<p>
Your Role within V-RAF : $role
<p>
Comments : $comments
</blockquote></td></tr></table>
</center></BODY></HTML>";
?>
what i dont understand is this works on y other server but not this 1 any ideas?