Display sql query in a generic html table

physician

New Member
I would like to run any sql query and able to display it a generic table in html.run_query.php:\[code\]<?phpinclude ('connectdb.php');echo "<p> Connected to MySQL database!</p>";$query_text = $_REQUEST['query_text'];$result = mysql_query($query_text) or die(mysql_error());mysql_close($con);?>\[/code\]sqlquery.php:\[code\]<form action="run_query.php" method="post"> <fieldset> <textarea id="query_text" name="query_text" cols="65" rows="8"> </textarea> </fieldset> <br /> <fieldset class="center"> <input type="submit" value="http://stackoverflow.com/questions/12814598/Run Query"> <input type="reset" value="http://stackoverflow.com/questions/12814598/Clear and Restart"> </fieldset></form>\[/code\]Hi.my question is how do i output the data into html page. as it would be a generic query, i can't specify the output into table. Is there another way to do it..? sorry my question sounds so newbie.. :)
 
Back
Top