Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 21st, 2009, 09:08 PM
Registered User
Join Date: May 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default need help updating and deleting!!!!!!!!!!!!!!!

hey guys, im new to this php and my sql stuff..i need help here.. i can delete/update stuff from the from into the database..but it is only for a specific name..but what i want is to delete/update stuff for any given name...this are the codes...thanks...

:::::THIS IS MY FORM:::::

<form action="delete.php" method="post">
Name: <input type="text" name="name"/>
Age: <input type="text" name="age" />
Hp : <input type="text" name="handphone" />
Email : <input type="text" name="email" />
Admin : <input type="text" name="admin" />
<input type='submit' name='remove' value='Delete' />



$con = mysql_connect("localhost","root","root");
if (!$con)
die('Could not connect: ' . mysql_error());
mysql_select_db("studentreg", $con);

mysql_query ( "DELETE FROM particulars WHERE name='sam' ");
echo "name deleted!!";


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help updating and deleting!!!!!!!!!!!!!!! samXR SQL Language 2 May 22nd, 2009 02:50 AM
Updating/Deleting from SQL using ASP Tee88 Classic ASP Databases 4 May 6th, 2005 11:14 AM
error in deleting,updating and records in asp method Classic ASP Databases 1 May 6th, 2005 10:35 AM
updating and deleting record PinkyCat Classic ASP Databases 4 March 16th, 2005 05:50 AM
Updating & Deleting Rows from a Repeater saturdave ASP.NET 1.0 and 1.1 Basics 4 February 19th, 2004 04:35 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.