homepage Welcome to WebmasterWorld Guest from 174.129.163.183
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Submit button not showing in Safari
TucsonBill




msg:4284663
 5:42 pm on Mar 20, 2011 (gmt 0)

I have a form with a submit button on an include page in PHP. All works well with IE and Firefox, but the button does not display in Safari. You can see this by going to [swwoodcarvers.org...] and navigating to the "Newsletters" page. There should be a Submit button below the dropdown. The code for this is:


<form action="index.php" method="post">
<?php
$query = "SELECT id, date, name from newsletter order by date desc";
$result = mysql_query($query) or die('Sorry, could not read newsletter table');
echo "<center>";
echo "<select name=\"newsletter\">\n";
echo "</center>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$value = $row['name'];
echo "<option value=\"$row[id]\">$value";
}
?>
<input type="hidden" name="content" value="showNewsletter">
<center>
. <br /><input type="image" name="news" src="Images/submitButton.jpg">
</center>
</form>


Anyone have any idea why the button will not show?

Thanks,
Bill

 

Matthew1980




msg:4285019
 12:56 pm on Mar 21, 2011 (gmt 0)

All looks good to me, can see the button on FF safari & IE & opera.

Try setting a variable for doing absolute file paths, so that you can eliminate any ambiguity on that.

Cheers,
MRb

jspeed




msg:4285071
 2:32 pm on Mar 21, 2011 (gmt 0)

I can see the submit button, however, the <center> tags I know are deprecated now.

Matthew1980




msg:4285127
 4:22 pm on Mar 21, 2011 (gmt 0)

>>however, the <center> tags I know are deprecated now.

Quite right, this is done through css now, and is really quite a nifty thing to do.

Cheers,
MRb

rocknbil




msg:4285131
 4:30 pm on Mar 21, 2011 (gmt 0)

This is likely nothing to do with PHP. Try

<input type="submit" style="border:none; display: block; width:150px; height:60px; text-indent:-50000px; outline:none; cursor:pointer; background:url(Images/submitButton.jpg) top left no-repeat;" value="Submit">

If that works, assign an ID to it and move the inline CSS to your style sheet.

<input type="submit" id="submitButton" value="Submit">

.....

#submitButton { border:none; display: block; width:150px; height:60px; text-indent:-50000px; outline:none; cursor:pointer; background:url(Images/submitButton.jpg) top left no-repeat; }

IntegrityWebDev




msg:4285745
 3:21 pm on Mar 22, 2011 (gmt 0)

If you remove the PHP completely does the button show up in Safari?

rocknbil




msg:4285792
 4:41 pm on Mar 22, 2011 (gmt 0)

<facepalm> (Thanks to integrity!) You also have a missing closing select tag which is probably the culprit. :-)

echo "<select name=\"newsletter\">\n";
echo "</center>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$value = $row['name'];
echo "<option value=\"$row[id]\">$value</option>";
}
echo "</select>";
?>

TucsonBill




msg:4285906
 8:00 pm on Mar 22, 2011 (gmt 0)

That did it rocknbil! Thanks a bunch! Can't believe I made a bonehead mistake like that.

Bill

rocknbil




msg:4286365
 4:59 pm on Mar 23, 2011 (gmt 0)

We all missed it. LOL

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved