Welcome to WebmasterWorld Guest from 54.226.62.251

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP form won't submit

sometimes it works sometimes it does'nt

     

knighty

8:21 am on Jul 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've had a news management system for a while now, basically PHP creates a form with radio buttons to either activate or deactivate a story.

I never had any problems on my mac but since I switched to PC sometimes the form works soemtimes it does'nt - no errors you click submit just nothing happens!

Knowles

1:23 pm on Jul 23, 2002 (gmt 0)

10+ Year Member



Are you running this locally on your PC? Or is the error happening just from you browser window with the script on the server?

knighty

2:04 pm on Jul 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is happening on a server, tried netscape and ie with same results.

source code:

<form metho="post" action="updater.php">
<table width='600' border='0' cellspacing='1' cellpadding='2'>
<tr align='center' bgcolor='#CCCCCC'>
<td align='left'><b>HEADLINE</b></td>
<td><b>CATEGORY</b></td>
<td><b>STATUS</b></td>
<td><b>ARCHIVE?</b></td>
<td><b>MAKE ACTIVE?</b></td>
</tr>
<?
[databse,username,password stuff goes here]
$query="SELECT * FROM database WHERE active!='o' order by cat ASC";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$pig=white;
while ($row = mysql_fetch_array($result)) {
$headline=mysql_result($result,$i,"headline");
$story=mysql_result($result,$i,"story");
$id=mysql_result($result,$i,"id");
$status=mysql_result($result,$i,"active");
$caty=mysql_result($result,$i,"cat");
$tidbit=substr($story,0,50);
if ($pig!='white')
{
$pig=white;
}
else {$pig='eeeeee';}
?>
<tr align='center' bgcolor=<? echo "$pig"; ?>>
<td align='left'><? echo"<a href='news_edit.php?id=$id'>$headline</a>"; ?></td>
<td>
<?
switch($caty)
{
case "b" :
echo "BUSINESS";
break;
case "n" :
echo "NEWS";
break;
case "v" :
echo "VIEWPOINT";
break;
}
?>
</td>
<td>
<?
if ($status=="a")
{
echo "ACTIVE";
}
else
{
echo "DEAD";
}
?>
</td>
<td>
<?
echo "<input type='radio' name='f_active[{$row[id]}]' value='o'>";
?>
</td>
<td>
<?
echo "<input type='radio' name='f_active[{$row[id]}]' value='a'>";
echo "<input type='hidden' name='oldactive[{$row[id]}]' value='{$row[active]}'";          
?>
</td>
<?
++$i;
}
?>
</tr>
</table>
<p>
<input type="submit" name="subarch" value="Submit">
<input type="reset" name="reset" value="Reset">
</p>
</form>

as I said never had any probs before- nothing has changed cept I'm using a PC

mavherick

2:12 pm on Jul 23, 2002 (gmt 0)

10+ Year Member



Could it be your opening form tag in which you have the attribute "metho" instead of method?

Knowles

2:15 pm on Jul 23, 2002 (gmt 0)

10+ Year Member



That could be the problem, doesnt make much since to me why it would work for IE (assuming) in Mac and not on PC. IE is very forgiving but I would think the PC one would be more forgiving then the Mac one. knighty did you just cut and paste the code?

knighty

2:49 pm on Jul 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HAHAHA!

Boy do I feel stupid!

[hangs head in shame]

changed metho to method works fine now! :)

Thanks for your help guys...

Knowles

2:50 pm on Jul 23, 2002 (gmt 0)

10+ Year Member



Dont feel bad knighty look for posts with my name, I making simple thing hard! Glad its workin for you now.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month