Page 1 of 1

Php browser issue

Posted: Wed Aug 04, 2010 3:19 am
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.

Re: Php browser issue

Posted: Wed Aug 04, 2010 3:53 am
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?

Re: Php browser issue

Posted: Wed Aug 04, 2010 4:08 am
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?

Re: Php browser issue

Posted: Wed Aug 04, 2010 8:57 am
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.

Re: Php browser issue

Posted: Wed Aug 04, 2010 9:36 am
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 :?