Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language 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, 04:50 AM
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 specific name...this are the codes..

:::::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' />
</form>
</body>
</html>


:::::THIS IS MY PHP CODES:::::

<?php

$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!!";
mysql_close($con)

?>
 
Old May 21st, 2009, 08:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

You better try this in the PHP forum. this is not related to SQL, you better try to learn how to concatenate strings.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old May 22nd, 2009, 02:50 AM
Registered User
 
Join Date: May 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey thanks anyway...but if u/anyone could help..it would be of much help..anyway thanks dude..cheers..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Categories spardoe BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 July 19th, 2006 03:07 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.