3v4l.org

run code in 300+ PHP versions simultaneously
<?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>"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "exam" in /in/cuG63 on line 3 Warning: Undefined array key "sub" in /in/cuG63 on line 4 Warning: Undefined array key "col" in /in/cuG63 on line 5 Warning: Undefined array key "row" in /in/cuG63 on line 6 <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/cuG63:12 Stack trace: #0 {main} thrown in /in/cuG63 on line 12
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:
87.8 ms | 402 KiB | 8 Q