Welcome to WebmasterWorld Guest from 50.19.190.144

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP form won't submit

sometimes it works sometimes it does'nt

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 8, 2001
posts:690
votes: 0


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!

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

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


Are you running this locally on your PC? Or is the error happening just from you browser window with the script on the server?
2:04 pm on July 23, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 8, 2001
posts:690
votes: 0


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

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

Junior Member

10+ Year Member

joined:June 3, 2002
posts:169
votes: 0


Could it be your opening form tag in which you have the attribute "metho" instead of method?
2:15 pm on July 23, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


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?
2:49 pm on July 23, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 8, 2001
posts:690
votes: 0


HAHAHA!

Boy do I feel stupid!

[hangs head in shame]

changed metho to method works fine now! :)

Thanks for your help guys...

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

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members