Jump to content

Button


samXR
 Share

Recommended Posts

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);?>

Edited by samXR
Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...