homepage Welcome to WebmasterWorld Guest from 54.237.99.131
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP form won't submit
sometimes it works sometimes it does'nt
knighty

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 471 posted 8:21 am on Jul 23, 2002 (gmt 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!

 

Knowles

10+ Year Member



 
Msg#: 471 posted 1:23 pm on Jul 23, 2002 (gmt 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?

knighty

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 471 posted 2:04 pm on Jul 23, 2002 (gmt 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

mavherick

10+ Year Member



 
Msg#: 471 posted 2:12 pm on Jul 23, 2002 (gmt 0)

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

Knowles

10+ Year Member



 
Msg#: 471 posted 2:15 pm on Jul 23, 2002 (gmt 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?

knighty

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 471 posted 2:49 pm on Jul 23, 2002 (gmt 0)

HAHAHA!

Boy do I feel stupid!

[hangs head in shame]

changed metho to method works fine now! :)

Thanks for your help guys...

Knowles

10+ Year Member



 
Msg#: 471 posted 2:50 pm on Jul 23, 2002 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved