Jump to content
Killersites Forums

phpboy

Member
  • Posts

    58
  • Joined

  • Last visited

Everything posted by phpboy

  1. ok... i'll try to change my updateform.html to updateform.php updateform.php <?php print ' ';$x = $_GET['number']; echo ''; print 'Number: '; print ''; print ' ';?> then my updateneil2.php: <?php $conn=mysql_connect("localhost","Root",""); mysql_select_db("library") or die("unable to connect"); $old_number=$_POST['oldnumber']; $new_number=$_POST['number']; mysql_query("UPDATE tablelibrary SET Books='$new_number' where name='$old_number'") or die("ERROR:mysql_error()); header("Location: updateneil.php"); ?> I just want to have a form in every row in my updateneil.php then in that form (updateform.php) the number entered there would be updated to my updatedneil2.php and then back to the page updateneil.php.. But still that isn't work out..
  2. yes bro... i have there form which a user can add/subtract number of books and go to my updateneil2.php the problem is my update code.. i try to delete those codes where Name=NAme AND Author=Author but still "cannot update" which means my sql query is wrong..
  3. ok bro... i am just pressured to finished it this week that's why i ask for your codes But then i am watching those videos right now... and also the links you gave a while ago.. ty for advice bro..
  4. bro, i havent finished watching those videos... but bro can u give me your codes in "UPDATES" for my database? i thing the number of books column will i just make for updates ryt? i have finished the registration form and now working on my search page.. bro i am just confused how i will do it..or how to do it clearly... bro one more time this would be the last.... ty again bro..
  5. ty bro.. got it working just easy as that codes!!! i'll try to watch those videos... ty again ..
  6. bro, supposetedly my deleteben1.php is right? how will you make my deleteben2.php....(after accessing your php now.. ) what will be your codes... database name: library table name : tablelibrary id,Books,Name,Author(columns) Using only the default username and password for connecting php to sql.. after deleting of items, show directly to the deleteben.php.. and keep on processing.... I'll be waiting bro..go to go school right now....see you later with your codes hehe ty
  7. i think theres something wrong here at my deleteben2.php $sql="DELETE FROM tablelibrary WHERE (id)='$_POST[id]'"; is this ryt connected the links in my deleteben.php? echo ' delete';
  8. in my above codes i just change the $_POST to $_GET.... and nothing changed.. it just shows the tables but doesnt deleted the item.. i think there's something to changed a lot there.. ty
  9. <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("library", $con);$sql="DELETE FROM tablelibrary WHERE (id)='$_POST[id]'";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "record/s deleted"; $result = mysql_query("SELECT * FROM tablelibrary"); echo " Name Author Number of Books ";while($row = mysql_fetch_array($result)) { echo " echo " " . $row['Name'] . ""; echo " " . $row['Author'] . ""; echo " " . $row['Books'] . ""; echo " "; } echo " ";mysql_close($con);?>
  10. so my deleteben.php is right? nothing to change ryt? cause it do have a link now going to my deleteben2.php how can u make my deleteben2.php? out of deleteben2.php? can u post here the codes in ur mind then i'll try to do it here if it's working:D
  11. promise i'll try my best to understand that and do my update page on my own then i post here my codes >_< ty:)
  12. what i mean is: in ur codes: echo ' delete';this is the link at this code deleteben2.php?id=' in the 'id=' do i have to put name there after equals? then in my page use the method $_GET['(name that i will put in id=''] waaa can u give me ur codes pls codes for a form showing my supposed to be what i want... for delete page and delete.php for every 'delete' link ty
  13. bro...i do have nothing to change in my deleteben.php? i try to do it but i failed here's my code for deleteben2.php <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("library", $con); $sql="DELETE FROM tablelibrary WHERE (id)='$_get[id]'"; header("location: deleteben1.php"); ?> and probably it doesnt run correctly.. can u give me your codes for it?? so that i can go on to my "UPDATES" page >_< another question.. how can i use the $_GET in a link?? i mean in using form we usually put 'names' in input types then put in our php page , $_GET['names']
  14. bro! i have sent u the codes u want..... ei i'm asking at the my deleteben.php there's a code there with the links to deleteben2.php how can i make the deleteben1.php that in every click of the link "delete" it will automatically delete the item and back again to the page
  15. <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("library", $con);$sql="DELETE FROM tablelibrary WHERE (id)='$_POST[id]'";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "record/s deleted"; $result = mysql_query("SELECT * FROM tablelibrary"); echo " Name Author Number of Books ";while($row = mysql_fetch_array($result)) { echo " echo " " . $row['Name'] . ""; echo " " . $row['Author'] . ""; echo " " . $row['Books'] . ""; echo " "; } echo " ";mysql_close($con);?>
  16. sir, where would i add those codes you gave? to my insert.php? and what will i do to my delete.php? sorry late reply got busy to my other subjects in school.... sir thanx anyways...
  17. Sir how can i add those code you gave to me in my delete page?
  18. Name of Book: Author: Number of Books:
  19. Sir by the way i'm doing a page that is only for admin of my work.. and i'll just supply there a username and password.. So only admin can do the insert, delete,and update of items
  20. Sir in that codes, 'test' is the name of the database right? and u mke a query ("SELECT * FROM test WHERE name='test'"); SELECT from? the database then WHERE name='test'? the name of the database again?
  21. Sir, in my theSis, i have done forms, Forms are for "INSERT" ," DELETE" and "UPDATE" Yes! i have done all completely by myself with the use of php and mysql... The scripts are all working.. In "INSERT" form if i insert one item the inserted item will be inserted in my database and then i show the list of items in the same page so that it will act good The same with the other 2 forms But in "DELETE" form If i deleted one item that is not in my database of course the scripts will just execute as what i designed to it.. But the real thing is that i want to display also that if one item is deleted or updated and that item is not found inside my database, a promt or echo will say that "the item is not in the list" i mean how can i do that? is there any ideas there Sir? ty in advance
  22. weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee it's just "r" grrrrrrrrrrrrrrrrr database created! yeah, i'm using the deault... anyways tY again sir, hope ur always there to answer my noob question
×
×
  • Create New...