Hi, can anyone help me where is the problem?
index.php
genproc.php
Why do I always get error? Or am I blink?
index.php
else if($action=="uset2"){
$dob = explode("-",$bdy[0]);
boxstart("Update");
echo "<p><form action=\"genproc.php?action=uprof2&sid=$sid\" method=\"post\">
School: <input id=\"inputText\" type=\"text\" name=\"school\" maxlength=\"30\"/><br/>
Bad HAbits: <input id=\"inputText\" type=\"text\" name=\"habitsb\" maxlength=\"150\"/><br/>
Good Habits: <input id=\"inputText\" type=\"text\" name=\"habitsg\" maxlength=\"150\"/><br/>
Sport: <input id=\"inputText\" type=\"text\" name=\"favsport\" maxlength=\"20\"/><br/>
Music: <input id=\"inputText\" type=\"text\" name=\"favmusic\" maxlength=\"20\"/><br/>
Orient Sex: <select id=\"inputText\" name=\"sexpre\">
<option value=\"Hetero\">Hetero</option>
<option value=\"Homo\">Homo</option></select><br/>
Height (cm): <input id=\"inputText\" type=\"text\" name=\"height\" maxlength=\"3\"/><br/>
Weight (kg): <input id=\"inputText\" type=\"text\" name=\"weight\" maxlength=\"3\"/><br/>";
/// echo "Race: <input id=\"inputText\" type=\"text\" name=\"racerel\" maxlength=\"50\"/><br/>";
echo "
Hair: <input id=\"inputText\" type=\"text\" name=\"hairtype\" maxlength=\"10\"/><br/>
Eyes: <input id=\"inputText\" type=\"text\" name=\"eyescolor\" maxlength=\"10\"/><br/>
- - - - -<br/>
Want more?: <input id=\"inputText\" type=\"text\" name=\"moretext\" maxlength=\"500\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Update\"/>
</form>
</p>";
}
$dob = explode("-",$bdy[0]);
boxstart("Update");
echo "<p><form action=\"genproc.php?action=uprof2&sid=$sid\" method=\"post\">
School: <input id=\"inputText\" type=\"text\" name=\"school\" maxlength=\"30\"/><br/>
Bad HAbits: <input id=\"inputText\" type=\"text\" name=\"habitsb\" maxlength=\"150\"/><br/>
Good Habits: <input id=\"inputText\" type=\"text\" name=\"habitsg\" maxlength=\"150\"/><br/>
Sport: <input id=\"inputText\" type=\"text\" name=\"favsport\" maxlength=\"20\"/><br/>
Music: <input id=\"inputText\" type=\"text\" name=\"favmusic\" maxlength=\"20\"/><br/>
Orient Sex: <select id=\"inputText\" name=\"sexpre\">
<option value=\"Hetero\">Hetero</option>
<option value=\"Homo\">Homo</option></select><br/>
Height (cm): <input id=\"inputText\" type=\"text\" name=\"height\" maxlength=\"3\"/><br/>
Weight (kg): <input id=\"inputText\" type=\"text\" name=\"weight\" maxlength=\"3\"/><br/>";
/// echo "Race: <input id=\"inputText\" type=\"text\" name=\"racerel\" maxlength=\"50\"/><br/>";
echo "
Hair: <input id=\"inputText\" type=\"text\" name=\"hairtype\" maxlength=\"10\"/><br/>
Eyes: <input id=\"inputText\" type=\"text\" name=\"eyescolor\" maxlength=\"10\"/><br/>
- - - - -<br/>
Want more?: <input id=\"inputText\" type=\"text\" name=\"moretext\" maxlength=\"500\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Update\"/>
</form>
</p>";
}
else if($action=="uprof2")
{
$sexpre = $_POST["sexpre"];
$height = $_POST["height"];
$weight = $_POST["weight"];
$racerel = $_POST["racerel"];
$hairtype = $_POST["hairtype"];
$eyescolor = $_POST["eyescolor"];
$habitsb = $_POST["habitsb"];
$habitsg = $_POST["habitsg"];
$favsport = $_POST["favsport"];
$favmusic = $_POST["favmusic"];
$school = $_POST["school"];
$moretext = $_POST["moretext"];
$res = mysql_query("UPDATE ibwf_xinfo SET sexpre='".$sexpre."', height='".$height."', weight='".$weight."', racerel='".$racerel."', hairtype='".$hairtype."', eyescolor='".$eyescolor."', habitsb='".$habitsb."', habitsg='".$habitsg."', favsport='".$favsport."', favmusic='".$favmusic."', school='".$school."', moretext='".$moretext."' WHERE id='".$uid."'");
if($res)
{
echo "Done<br/>";
}else{
echo "Error<br/>";
}
}
{
$sexpre = $_POST["sexpre"];
$height = $_POST["height"];
$weight = $_POST["weight"];
$racerel = $_POST["racerel"];
$hairtype = $_POST["hairtype"];
$eyescolor = $_POST["eyescolor"];
$habitsb = $_POST["habitsb"];
$habitsg = $_POST["habitsg"];
$favsport = $_POST["favsport"];
$favmusic = $_POST["favmusic"];
$school = $_POST["school"];
$moretext = $_POST["moretext"];
$res = mysql_query("UPDATE ibwf_xinfo SET sexpre='".$sexpre."', height='".$height."', weight='".$weight."', racerel='".$racerel."', hairtype='".$hairtype."', eyescolor='".$eyescolor."', habitsb='".$habitsb."', habitsg='".$habitsg."', favsport='".$favsport."', favmusic='".$favmusic."', school='".$school."', moretext='".$moretext."' WHERE id='".$uid."'");
if($res)
{
echo "Done<br/>";
}else{
echo "Error<br/>";
}
}
Comment