3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Marks Sheet</title> <script type="text/javascript"> function mess() { window.alert("First row must be used for Column Heading"); } </script> </head> <body onLoad="mess()"> <?php $exam=$_POST['exam']; $sub=$_POST['sub']; $col=$_POST['col']; $row=$_POST['row']; /*echo $exam; echo "<br>"; echo $sub; echo "<br>"; echo $col; echo "<br>";*/ echo "<p align='center'<b><font size='+2'>". $exam . "</font></b></p>"; echo "<p align='center'<b><font size='+1'>". $sub . "</font></b></p>"; $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("marks", $con); $result = mysql_query("SELECT * FROM vi"); while($row = mysql_fetch_array($result)) { echo $row['1']; echo "<br />"; } mysql_close($con); echo"<div align='center'"; echo "<form name='sheet' action='csheet.php' onsubmit='return check()' method='post'>"; echo"<table width='200' border='1'>"; for($a=1;$a<=$row;$a++) { echo"<tr bgcolor='#0099FF'>"; for($b=1;$b<=$col;$b++) { echo"<td><input type='text' name='' size='8' /></td>"; } echo"</tr>"; } echo"</table>"; echo "<input type='submit' value='Submit'>"; echo "</form></div>"; ?> </body> </html>
Output for git.master, git.master_jit, rfc.property-hooks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Marks Sheet</title> <script type="text/javascript"> function mess() { window.alert("First row must be used for Column Heading"); } </script> </head> <body onLoad="mess()"> Warning: Undefined array key "exam" in /in/D74hR on line 15 Warning: Undefined array key "sub" in /in/D74hR on line 16 Warning: Undefined array key "col" in /in/D74hR on line 17 Warning: Undefined array key "row" in /in/D74hR on line 18 <p align='center'<b><font size='+2'></font></b></p><p align='center'<b><font size='+1'></font></b></p> Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/D74hR:24 Stack trace: #0 {main} thrown in /in/D74hR on line 24
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.81 ms | 402 KiB | 8 Q