Php browser issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gunter
Forum Newbie
Posts: 9
Joined: Wed Aug 04, 2010 3:09 am

Php browser issue

Post by gunter »

Hey, recently written a little piece of code to generate pieces of text with the click of a link, but for some reason, I doesn't seem to be working in Opera.

Any of you guys had this problem? Or know know how to go about fixing this. I origionaly thought it was a chache issue, but doesn't seem to be the case. Error reporting also shows nothing. So I'm a little stumped.

thanks for any advice.

Code: Select all

<?php 

if($_GET['act'] == "generate_quotes") { 

$db = mysql_connect("*", "*", "*") or die ("Unable to connect to database."); 
mysql_select_db("quote") or die ("Unable to select database."); 


$result = mysql_query( " SELECT * FROM `quote`  ORDER BY RAND() LIMIT 0,1 " ); 
$fetch = mysql_fetch_array($result);  


echo "<blockquote>".$fetch['q_quote']; 
mysql_close($db); 
echo "</blockquote>";

} else {  

echo "<img src=\"1.png\">"; 

 } 
?> 

<a href='gengen.php?act=generate_quotes'>Generate</a>


Thanks for any help.
dejvos
Forum Contributor
Posts: 122
Joined: Tue Mar 10, 2009 8:40 am

Re: Php browser issue

Post by dejvos »

This is not a problem of PHP. PHP is not client side! Are you sure that "blockquote" tag is supported in your version of Opera?
gunter
Forum Newbie
Posts: 9
Joined: Wed Aug 04, 2010 3:09 am

Re: Php browser issue

Post by gunter »

dejvos wrote:This is not a problem of PHP. PHP is not client side! Are you sure that "blockquote" tag is supported in your version of Opera?
Hey, thanks but yeah I'm aware that PHP is client side, but I was a little confused as to what the problem was so i wondering if it was infact the PHP it's self. I'm a little stumped to be honest.

I thought the <blockquote> tag is supported in all major browsers? I'll have a look for some alternatives but Is this definitely a HTML issue other than a PHP issue?

Sorry to post in the wrong forum >.< But does anyone know any other alternatives to display the fetch array? is indeed <blockquote> is the problem?
eruna
Forum Newbie
Posts: 17
Joined: Mon Jun 28, 2010 2:02 pm

Re: Php browser issue

Post by eruna »

Its definitely a front-side issue. Have you tried validating the page? Some times a misplaced character will be ignored by some browsers while causing an error on others.
gunter
Forum Newbie
Posts: 9
Joined: Wed Aug 04, 2010 3:09 am

Re: Php browser issue

Post by gunter »

eruna wrote:Its definitely a front-side issue. Have you tried validating the page? Some times a misplaced character will be ignored by some browsers while causing an error on others.
Cheers for the info, but yeah the page validates fine and nothing seems to be out of place, still trying to find something that's wrong with it.

If anyone else has any help would be much appreciated because I'm stumped :?
Post Reply