basically what i am trying to do is to create a registeration system whereby upon filling in detials in a form the user hits submit then their details are echoed back to them in another page which contains hidden variables of everything entered in the form. From here the user will hit submit then will be redirected to the last page which will give a message saying their detials have been input to the database. the only prob i have is that regarding normal text inputs everything is ok, however combo boxes or select boxes are a real problem for me BIG TIME . i keep getting blank entrys as far as these are concerned i need some suggestions as to what i could be doing wrong. also the combo boxes should contain a single value. also what is weird is when printing back the combo boxed variables in the second page it works fine but when going to the third page which calls a method from another page to insert the data the only thing that appears the record is the firstname and surname of the user.let me know asap!
if ( $fupload_type == "image/pjpeg" or $fupload_type == "image/gif")
{
copy ($fupload, "$file_dir/$fupload_name") or die ("could'nt copy");
print "<center><img src=\"$file_url/$fupload_name\"></center><p>\n\n";
}
}
print "<center>If you have chosen not to submit an image of yourself, so ignore this message <br><b><u>or</u></b><br>
you have chosen a wrong image type please choose either a gif or a jpeg if you wish
to submit an image of yourself</center><br>";
?>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT FACE ="VERDANA" SIZE="1">
<?php
if ( isset ($fupload) )
{
print "name of image file : \n <i>$fupload_name</i><br>";
print "size of image file : \n <i>$fupload_size bytes</i><br>";
print "type of image file : \n <i>$fupload_type</i><br><br>";
}
?>
</TD>
</TR>
<TD>
<FONT FACE ="VERDANA" SIZE="1">
<?PHP
PRINT "THESE ARE YOUR DETAILS PLEASE CONFIRM..... <BR>\n\n";
PRINT "YOUR USERNAME IS: \n\n <B>$UNAME</B> <BR>";
PRINT "YOUR PASSWORD IS: \n\n <B>$PASSWORD</B> <BR>";
PRINT "YOUR FIRSTNAME IS: \n\n <B>$FNAME</B> <BR>";
PRINT "YOUR SURNAME IS: \n\n <B>$SNAME</B> <BR>";
PRINT "YOUR ARE \n\n <B>$AGE</B>\n YEARS OLD <BR>";
FOREACH ( $COB[] AS $VALUE )
{
PRINT "YOUR COUNTRY OF BIRTH IS: \n\n <B>$VALUE</B> \n <BR>";
}
FOREACH ( $SEX AS $VALUE )
{
PRINT "YOUR ARE \n\n <B>$VALUE</B> \n <BR>";
}
PRINT "YOUR HEIGHT IS \n\n ";
FOREACH ( $FEET AS $VALUE )
{
PRINT "<B>$VALUE</B> \n FT \n ";
}
<?PHP
IF ("SUBMIT" == @$SUBMIT) {
// the function
insertRecord(
$UNAME,$PASSWORD,$PHOTO,$FNAME,$SNAME,$SEX,$AGE,$FEET,$INCHES,
$HAIR,$EYES,$BUILD,$RELIGION,$CAST,$INTERESTS,$ADDRESS,$TEL,$EMAIL,$FAX,$COB);
}
?>
</BODY>
</HTML>
heres the code from dbm.php
<?php
include("dbg.inc");
//the function
function insertRecord(
$UNAME,$PASSWORD,$PHOTO,$FNAME, $SNAME,$SEX,$AGE,$FEET,$INCHES,
$HAIR,$EYES,$BUILD,$RELIGION,$CAST,$INTERESTS,$ADDRESS,$EMAIL,$FAX,$COB)
{
$sql = "INSERT INTO MEMBER (
username, password, photo, forename, surname, sex, age, feet,inches,
body, religion, cast, hobbies, email, COB)
VALUES (
'$UNAME','$PASSWORD','$PHOTO','$FNAME', '$SNAME','$SEX','$AGE','$FEET','$INCHES',
'$BODY','$RELIGION','$CAST','$INTERESTS','$EMAIL','$COB'
)";
if (mysql_query($sql)) {
echo("<P>Thank you $FNAME $SNAME your Details have been submitted to the database,
you will recieve an e-mail within 24 hours.</P>");
} else {
echo("<P>Error adding Your Details, please try again.
If it continues contact : " .
mysql_error() . "</P>");
}
}
?>
its all really messed up please tell me what you think asap. thanks
Bookmarks