samXR Posted June 9, 2009 Share Posted June 9, 2009 dude, i cannot put a button right next to the table..haha..help here..sorry if stupid question..thanks..:::::::::php codes:::::::::<?php$Name = $_POST['name'];$con = mysql_connect("localhost","root","root");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("studentreg", $con);$result = mysql_query("SELECT * FROM particulars WHERE Name='$Name'");echo "<table border='1'><tr><th>Name</th><th>Handphone</th><th>Email</th><th>Admin</th></tr>";while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['Name'] . "</td>" ; echo "<td>" . $row['Handphone'] . "</td>"; echo "<td>" . $row['Email'] . "</td>"; echo "<td>" . $row['Admin'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con);?> Link to comment Share on other sites More sharing options...
smerny Posted June 9, 2009 Share Posted June 9, 2009 what exactly do you mean by "next to" and what do you want the button to do? Link to comment Share on other sites More sharing options...
samXR Posted June 9, 2009 Author Share Posted June 9, 2009 what exactly do you mean by "next to" and what do you want the button to do? put the button and a checkbox next to the table..and i want the button to update(going to update.php) Link to comment Share on other sites More sharing options...
smerny Posted June 9, 2009 Share Posted June 9, 2009 so you want a button to the right or left of the table as opposed to above or beneath it? and you want the form to consist of just a checkbox and a button?<form action='update.php' method='post'><input type='checkbox' name='whatever' value='whatever' /><input type='submit' name='submit' value='submit' /></form>what do you want your checkbox to do? if the code above is "update.php" then the only thing the code could benefit from is a text input called Name? which would be like...<form action='update.php' method='post'><input type='text' name='Name' value='enter name' /><input type='submit' name='submit' value='submit' /></form> Link to comment Share on other sites More sharing options...
samXR Posted June 11, 2009 Author Share Posted June 11, 2009 hey u have msn or yahoo messenger?? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.