...

View Full Version : PHP error?



cnelson
02-10-2006, 01:59 AM
heres my code;

if(!isset($mode)) { $mode = 'index'; }

switch($mode) {
case 'index':

?>

<FORM ACTION="<?PHP ECHO "$PHP_SELF"; ?>?mode=process" METHOD="post">

<TABLE cellspacing="3" cellpadding="3" border="1" bordercolor="#000000" WIDTH="100%">

<TR><TD WIDTH="20%"><STRONG>Item Name:</STRONG> </TD><TD WIDTH="80%"><INPUT TYPE="text" SIZE="50" NAME="itemname"> </TD></TR>
<TR><TD WIDTH="20%" valign="top"><STRONG>Item Desc:</STRONG> </TD><TD WIDTH="80%"><TEXTAREA COLS="50" ROWS="4" name="itemdesc"></TEXTAREA> </TD></TR>

</TABLE></FORM>

<?PHP

break;


case 'process':

$itemname = strip_tags($_POST["itemname"]);
$itemdesc = strip_tags($_POST["itemdesc"]);

$query="insert into `item` (itemid,itemname,itemdesc) VALUES ('','$itemname','$itemdesc')";

$result = mysql_query($querycon) or die (mysql_error());

if ($result) {

echo "Item Added";

}

break;

}

?>


heres my error; www.visionstudios.be/ratedata/add.php

could someone please help? thanks. -cnelson. :)

the page is offline right now, but it said it was a pharse error, on line 22?

raf
02-10-2006, 07:31 AM
you'll probably get more help if you post the complete code + if you highlight line 22

cnelson
02-10-2006, 11:06 AM
that is the complete code.. i've got the error to go away, except now theres no submit button.. ? www.visionstudios.be/ratedata/add.php

NancyJ
02-10-2006, 11:11 AM
that is the complete code.. i've got the error to go away, except now theres no submit button.. ? www.visionstudios.be/ratedata/add.php
theres no submit button in your code.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum