Jump to content
Killersites Forums


  • Posts

  • Joined

  • Last visited

phpboy's Achievements


Newbie (1/14)



  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']
  • Create New...