hi i use lava script. I did a normal form but does not work. if someone knows why. Thanks and sorry but my english is bad
this is index.php file
echo "<form action=\"main2.php?action=post&sid=$sid\" method=\"post\">";
echo "<b>Name:</b><br/><textarea name=\"ucaptxt\" rows=\"1\ cols=\"25\" maxlength=\"500\">$page[0]</textarea><br>";
echo "Category: <select name=\"dir\" value=\"$dir[0]\">";
if($dir[0]=="1"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"1\"$selected>bla bla</option>";
if($dir[0]=="2"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"2\"$selected>bla bla 2</option>";
if($dir[0]=="3"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"3\"$selected>bla bla 3</option>";
if($dir[0]=="4"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"4\"$selected>bla bla 4</option>";
if($dir[0]=="5"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"5\"$selected>bla bla 5</option>";
if($dir[0]=="6"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"6\"$selected>bla bla 6</option>";
if($dir[0]=="7"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"7\"$selected>bla bla 7</option>";
if($dir[0]=="0"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"0\"$selected>bla bla 8</option>";
echo "</select><br/>";
echo "<input type=\"Submit\" value=\"ok\" name=\"Post\"></form>";
this is main2.php file action="post"
$who = cleanQuery($_GET["who"]);
$user = getnick_sid($sid);
$dir = cleanQuery($_POST["dir"]);
$text = cleanQuery($_POST["ucaptxt"]);
echo "<head>";
echo "<title>Updating Shouts</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
include("header.php");
echo "<div align=\"center\">";
echo "<b>Update Status</b><br/>";
$uid = getuid_sid($sid);
$shtm = time();
$res = mysql_query("INSERT INTO ibwf_status SET stext='".$text."', stime='".$shtm."', uid='".$uid.", dir='".$dir."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Your Status was Successfully change<br/><br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error<br/><br/>";
}
echo "<a href=\"index.php?action=viewuser&sid=$sid& who=$uid\">Back To Profile</a><br/>";
echo "<a href=\"index.php?action=status&sid=$sid&wh o=$uid\">Status Page</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home Page</a>";
echo "</div>";
include("footer.php");
echo "</body>";
this is index.php file
echo "<form action=\"main2.php?action=post&sid=$sid\" method=\"post\">";
echo "<b>Name:</b><br/><textarea name=\"ucaptxt\" rows=\"1\ cols=\"25\" maxlength=\"500\">$page[0]</textarea><br>";
echo "Category: <select name=\"dir\" value=\"$dir[0]\">";
if($dir[0]=="1"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"1\"$selected>bla bla</option>";
if($dir[0]=="2"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"2\"$selected>bla bla 2</option>";
if($dir[0]=="3"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"3\"$selected>bla bla 3</option>";
if($dir[0]=="4"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"4\"$selected>bla bla 4</option>";
if($dir[0]=="5"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"5\"$selected>bla bla 5</option>";
if($dir[0]=="6"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"6\"$selected>bla bla 6</option>";
if($dir[0]=="7"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"7\"$selected>bla bla 7</option>";
if($dir[0]=="0"){$selected=" selected=\"selected\"";}else{$selected="";}
echo "<option value=\"0\"$selected>bla bla 8</option>";
echo "</select><br/>";
echo "<input type=\"Submit\" value=\"ok\" name=\"Post\"></form>";
this is main2.php file action="post"
$who = cleanQuery($_GET["who"]);
$user = getnick_sid($sid);
$dir = cleanQuery($_POST["dir"]);
$text = cleanQuery($_POST["ucaptxt"]);
echo "<head>";
echo "<title>Updating Shouts</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
include("header.php");
echo "<div align=\"center\">";
echo "<b>Update Status</b><br/>";
$uid = getuid_sid($sid);
$shtm = time();
$res = mysql_query("INSERT INTO ibwf_status SET stext='".$text."', stime='".$shtm."', uid='".$uid.", dir='".$dir."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Your Status was Successfully change<br/><br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error<br/><br/>";
}
echo "<a href=\"index.php?action=viewuser&sid=$sid& who=$uid\">Back To Profile</a><br/>";
echo "<a href=\"index.php?action=status&sid=$sid&wh o=$uid\">Status Page</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home Page</a>";
echo "</div>";
include("footer.php");
echo "</body>";
Comment