redarrow Posted March 25, 2007 Share Posted March 25, 2007 Hi all i have finished a project and the project went well i had help for some things off some user's from the forum thank you. The problam i got is that if i view my project in internet exsploer the looking result is perfect, but if i view the same project throw firefox the project halts at page's that are useing the ob_start() function. i dont use css for this project as off all the cross browser conflicts. so what i need to no is there a way to do html or php code using both internet exsplorer and firefox. i dont wont to use any javascript hacks to solve this problam i need to no the correct way to code for both browers. is there a website to view what works for both internet exsploer and firefox in css. is there a list of xhtml and html that work on both exsploer and firefox. How do we as programmers solve this problam? Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/ Share on other sites More sharing options...
Waldir Posted March 25, 2007 Share Posted March 25, 2007 i dout php has anything to do with the browser, your end result is html/css after all Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-214993 Share on other sites More sharing options...
redarrow Posted March 25, 2007 Author Share Posted March 25, 2007 so what wrong with this code then as it works perfect in internet exsporer. but only shows the url in firefox. <?php ob_start(); Header("Content-Type: image/jpeg"); session_start(); if($_GET['cmd']=="go") { echo"<meta http-equiv='refresh' content='1;url=http://www.xxxxx.co.uk/mat_website/register.php'>"; unset($new_string); unset($random); session_destroy(); } /*We'll set this variable later.*/ $new_string=$_POST['new_string']; $random=$_POST['random']; /*register the session variable. */ session_register('new_string'); /*You will need these two lines below.*/ echo "<html><head><title>Verification</title></head>"; echo "<body>"; /* set up image, the first number is the width and the second is the height*/ $im = ImageCreate(150, 20); /*creates two variables to store color*/ $white = ImageColorAllocate($im, 255, 255, 0); $black = ImageColorAllocate($im, 255, 69, 0); /*random string generator.*/ /*The seed for the random number*/ srand((double)microtime()*1000000); /*Runs the string through the md5 function*/ $string = md5(rand(0,9999)); /*creates the new string. */ $new_string = substr($string, 17, 5); /*fill image with black*/ ImageFill($im, 0, 0, $black); /*writes string */ ImageString($im, 4, 60, 3, $new_string, $white); /* output to browser*/ Imagepng($im, "grey.png"); ImageDestroy($im); ?> <html> <head> <title>Dj Phc</title> <body bgcolor="#ff333" vlink="blue" link="blue" alink="blue"> <?php $date_now=date("d-m-y"); $time_now=date("h:i:s"); $ip=$_SERVER['REMOTE_ADDR']; ?> <table align="center"><td><font color="yellow">Date([<?php echo $date_now;?>])</font></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td><td><font color="yellow">Time([<?php echo $time_now;?>])</font></td><td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td><td><font color="yellow">Ip Logged([<?php echo $ip?>])</font></td></table> <?php include("header.php");?> <p></p> <table align="center" width="600" border="4" bordercolor="black"> <td align="center"> <table width="290" border="4" bordercolor="black"> <td align="center"> <form method="POST" action="register_result.php"> <br> <font color="yellow">Username <br> <input type ="text" name="name"> <br> <br> Password <br> <input type="password" name="password"> <br> <br> Valid Email Address</font> <br> <input type="text" name="mail"> <br> <br> <?php echo "<img src=\"grey.png\">"; ?> <br> <input type="text" name="random" value="Please enter code... "> <input type="hidden" name="<?$x?>" value=""> <br> <br> <input type="submit" name="submit" value="Register"> <br> </form> </table></td> <td> <table width="290" height="330" border="4" bordercolor="black"> <td align="left" valign="top"> <?php $db=mysql_connect("localhost","xxxx","xxxx"); mysql_select_db("mat_website",$db); $query="select c_register from admin_configure where id='00001'"; $result=mysql_query($query); while($x=mysql_fetch_assoc($result)){ echo"<font color='yellow'>".$x['c_register']."</font>"; } ?> </table></td> </td> </table> <?php include("footer.php");?> </body> </html> <?php ob_flush(); ?> Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-214995 Share on other sites More sharing options...
Waldir Posted March 25, 2007 Share Posted March 25, 2007 well because firefox returns a page with the errors (white background) without rendering any of it, however IE renders everything and just displays the errores, fix your errors and youll be set Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-214998 Share on other sites More sharing options...
Hypnos Posted March 25, 2007 Share Posted March 25, 2007 The problem isn't firefox. It's your code. You sent the image/jpeg header, then you started outputting HTML. You need to make up your mind as to whether this is an image, or a HTML page. Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-215027 Share on other sites More sharing options...
AndyB Posted March 25, 2007 Share Posted March 25, 2007 is there a website to view what works for both internet exsploer and firefox in css. is there a list of xhtml and html that work on both exsploer and firefox. W3C Recommendations - http://www.w3.org/Consortium/siteindex How do we as programmers solve this problam? Follow the W3C Recommendations Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-215043 Share on other sites More sharing options...
redarrow Posted March 25, 2007 Author Share Posted March 25, 2007 this is a valid code with valid code within the header page and footer page now as what i can can see from html valadation and read about you can not set the border color only buy css is that correct i tried bordercolor=black and bordercolor="black" so in essance you can not use the normal bordercolor attubute only css am i correct? <?php ob_start(); session_start();?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <?php if($_GET['cmd']=="go") { echo"<meta http-equiv='refresh' content='1;url=xxxxxxxxxxxx/mat_website/register.php'>"; unset($new_string); unset($random); session_destroy(); } /*We'll set this variable later.*/ $new_string=$_POST['new_string']; $random=$_POST['random']; /*register the session variable. */ session_register('new_string'); /*You will need these two lines below.*/ echo "<html><head><title>dj phc</title></head>"; echo "<body bgcolor='#ff3330' vlink='blue' link='blue' alink='blue'>"; /* set up image, the first number is the width and the second is the height*/ $im = ImageCreate(150, 20); /*creates two variables to store color*/ $white = ImageColorAllocate($im, 255, 255, 0); $black = ImageColorAllocate($im, 255, 69, 0); /*random string generator.*/ /*The seed for the random number*/ srand((double)microtime()*1000000); /*Runs the string through the md5 function*/ $string = md5(rand(0,9999)); /*creates the new string. */ $new_string = substr($string, 17, 5); /*fill image with black*/ ImageFill($im, 0, 0, $black); /*writes string */ ImageString($im, 4, 60, 3, $new_string, $white); /* output to browser*/ Imagepng($im, "grey.png"); ImageDestroy($im); ?> <?php $date_now=date("d-m-y"); $time_now=date("h:i:s"); $ip=$_SERVER['REMOTE_ADDR']; ?> <table align="center"><tr><td><font color="yellow">Date([<?php echo $date_now;?>])</font></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td><td><font color="yellow">Time([<?php echo $time_now;?>])</font></td><td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td><td><font color="yellow">Ip Logged([<?php echo $ip?>])</font></td></tr></table> <?php include("header.php");?> <p></p> <table color=black align="center" width="600" border="4"> <tr><td align="center"> <table width="290" border="4" > <tr><td align="center"> <br> <form method="POST" action="register_result.php"> <br> <font color="yellow">Username <br> <input type ="text" name="name"> <br> <br> Password <br> <input type="password" name="password"> <br> <br> Valid Email Address</font> <br> <input type="text" name="mail"> <br> <br> <?php echo "<img src=\"grey.png\" alt=\"dj\">"; ?> <br> <input type="text" name="random" value="Please enter code... "> <input type="hidden" name="<?$x?>" value=""> <br> <br> <input type="submit" name="submit" value="Register"> <br> </form> </table></td> <td> <table width="290" border="4" > <tr><td align="left" valign="top"> <br><br><br> <?php $db=mysql_connect("localhost","xxx","xxx"); mysql_select_db("mat_website",$db); $query="select c_register from admin_configure where id='00001'"; $result=mysql_query($query); while($x=mysql_fetch_assoc($result)){ echo"<font color='yellow'>".$x['c_register']."</font>"; } ?> </table></td> </tr> </table> <?php include("footer.php");?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-215044 Share on other sites More sharing options...
redarrow Posted March 26, 2007 Author Share Posted March 26, 2007 thank's everone that is a intresting link and tutorals done all them at collage years ago. q1. what i want to no now does a valadated page get ranked higher in google then a unvaladated page cheers?. q2. does a css website get ranked higher in google?. q3. has anyone got any tips on ranking with goolge as the search engine keeps changing it's website prefrence to rank websites any info cheers? Also to make more off a intresting find, did you no afther all that website modifiing the fire fox looks better then the internet exsplorer lol Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-215069 Share on other sites More sharing options...
redarrow Posted March 26, 2007 Author Share Posted March 26, 2007 if you want to learn css easy way then i done 7 lessons only 7 sorry but here we go lol only works properly in ie ok at the moment learning cross browser compaterbilty ok. http://freesingles.ath.cx/css_website/ Link to comment https://forums.phpfreaks.com/topic/44263-solved-internet-exsploer-and-firefox-and-php/#findComment-215072 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.