Jump to content
Stef's Coding Community

TomTom

Member
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About TomTom

  • Rank
    New member
  1. Ideally, i am trying to figure out a way for the user to pick one of, say 3, options: Search database table by: 1)shop address. 2)contact no 3)contact name and based on that have the information delivered in a table. <form action="select.php" method="get"> Shop Address<input name="1" type="checkbox" value="shop_address" /> Contact No<input name="1" type="checkbox" value="contact_no" /> Contact name<input name="1" type="checkbox" value="contact_name"/> <input name="2" type="text" /> <input type="submit" value="Submit" /> </form>
  2. Hi Ben, Yes, again, a foolish mistake. I also changed the "id" to "cust_no" in the following: $result = mysql_query("DELETE FROM customer WHERE id=$cust_no") It is working now.Thanks. Much appreciated. I have also been trying to put together a "select" query for my database where the user can decide on the criteria that they want to search the table by. The table has shop_no,shop_ address, contact_no, contact_name. Would check boxes be the best way to go ? <form action="select.php" method="get"> Shop Address<input name="1" type="checkbox" value="shop_ad
  3. Hi Ben, Thanks for getting back to me on this. As requested here is my "view.php": I have re-checked it against your original & it seems OK....but then again, what do I know. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>View Records</title> </head> <body> <?php /* VIEW.PHP Displays all data from the customer table */ // connect to the database include('connect-db.php'); // get results from database $result = mysql_query("SELECT
  4. Hi Ben, I am totally new to php & found this which has helped me greatly to understand it.Thanks. I have used your MySQL first example in MySQL basic to see how it all works but am having issues with the "delete" & the "edit". I was hoping you could help me with it? The "delete" is just not doing anything when it is clicked. <?php // connect to the database include('connect-db.php'); // check if the 'id' variable is set in URL, and check that it is valid if (isset($_GET['cust_no']) && is_numeric($_GET['cust_no'])) { // get id value $cust_no = $_GET['cust_n
×
×
  • Create New...