Jump to content

Ok Im Now Working On An Admin But....


TKW22
 Share

Recommended Posts

im trying to delete stuff out of the data base using something like this.

 <?php        while($rowy = mysql_fetch_array($result))  {      echo '<tr>';      echo '<td>' . $rowy['name'] . '</td>';      echo '<td>' .  $rowy['id'] . '</td>';      echo '<td>' . $rowy['email'] . '</td>';      echo '<input type="submit" value="get rid of" name="userd"/>';      echo '</tr>';  }        ?>

if i can do this can you tell me how?also how can i make new pages form the admin using a template I'v made?

Link to comment
Share on other sites

Easiest way would be to write a separate Delete script and on this page, write a link to the delete.php script using the row['id'] as an identifier to set the id to be deleted.

Link to comment
Share on other sites

Easiest way would be to write a separate Delete script and on this page, write a link to the delete.php script using the row['id'] as an identifier to set the id to be deleted.
is there any Tutorials on making an admin?and how would i get the info form that row to delete it?
Link to comment
Share on other sites

If you include a link to a new delete script, which can either be a form with a hidden field that contains the id or a http link using a GET address(like http://www.yourdomain.com/delete.php?id=123) then you can pass the row to delete to the delete script.You can then use $_REQUEST['id']; to get the id and use DELETE in mysql to delete the id row.

Link to comment
Share on other sites

If you include a link to a new delete script, which can either be a form with a hidden field that contains the id or a http link using a GET address(like http://www.yourdomain.com/delete.php?id=123) then you can pass the row to delete to the delete script.You can then use $_REQUEST['id']; to get the id and use DELETE in mysql to delete the id row.
thanks got it and what about making new pages using the admin and a template i made?
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...