Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: rvr1
  • Order by date
  1. rvr1

    PHP Associated Array - shopping cart

    I am setting up a basic shopping cart and at present I have the folowing code to store the product_id and quantity of those items which the customer has added to the basket: $product_details = array("qty" => $quantity, "productID" => $product_id); if(isset($_SESSION['cart'][$product_id])) {...
  2. rvr1

    PHP location - where am I going wrong

    I have the following line of code: include ('Location: description.php?prod_id=$product_id'); but I receive the error: Warning: main(Location: description.php?prod_id=$product_id): failed to open stream: No such file or directory I think it is obvious to see what I am trying to do - open a...
  3. rvr1

    Generate a hyperlink specifying the contents of a single frame

    Could you please explain that in a bit more detail. I am still quite new to all this.... Thanks!
  4. rvr1

    Generate a hyperlink specifying the contents of a single frame

    I have hit a snag with my site and hope someone can help. I have a page comprised of three frames: ------------- | Header | ------------- | MainFrame | ------------- | Footer | ------------- The contents of mainframe is generated dynamically. This has all been working fine, however...
  5. rvr1

    SELECT FOUND_ROWS() Question

    I have the following query: $sql = "SELECT product_name FROM products,product_brand_category WHERE products.product_id = product_brand_category.product_id AND brand_id='9' AND category_id='5'"; $result = mysql_query($sql) or die ("Could not execute query" . mysql_error()); while ($row =...
  6. rvr1

    Creating a simple query

    Hi, This is my first real project using mysql and PHP and would like some help creating a query please. I have two tables: Table 1 [product_id, product_desc, product_cost] Table 2 [brand_id, category_id, product_id] What I want to do is search table 2 for entries where the brand_id and...
  7. rvr1

    Array Session Variable

    I hope this will be a basic question for some of you – it’s my first major PHP project and I am picking it up as I go along. Please can someone explain to me how to store a dynamic number of variables so that they can recalled on future pages. i.e. I wish to mimic the functionality of a...
  8. rvr1

    Finding the number of days betwen two dates

    I am developing my first PHP application and would like some help writing a function to find the number of days between a date stored in a mySQL database and the current date. If anyone could help me with this, I would appreciate it. Thanks.
  9. rvr1

    Session Variables

    Hi, I am having problems with session variables. Initially I set the variables using: session_register('unittitle','unitcode','unitcodepk'); These variables can then be used in different pages by refering to them as $unittitle etc... Once the user has entered all info, I save the values of...
  10. rvr1

    Newbie Question - Allowing certain characters in textarea

    Hi, On my site a user has to enter data into a textarea. However, when the data is re-displayed on another form, if the user has entered characters such as \ or ' etc, they are always preceeded by a \. How can I overcome this? I'm sure it's very simple, but this is my first php project and I...
  11. rvr1

    Saving Passwords to a mySQL Database

    By reversing the order of the insert values, it now works! $sql = "INSERT INTO ModLoginTable (password,ModLogName) VALUES (password('$randompassword'),'$modlogname')"; mysql_query($sql) or die ("Cannot create a new entry in the ModLoginTable Table" ...
  12. rvr1

    Saving Passwords to a mySQL Database

    The error message I get is: Cannot create a new entry in the ModLoginTable Table You have an error in your SQL syntax near '' at line 2 Thanks for the help so far :) Rob
  13. rvr1

    Saving Passwords to a mySQL Database

    I am attempting to save a password to a mySQL table using the following code: $sql = "INSERT INTO ModLoginTable (ModLogName,password) VALUES ('$modlogname',password('$randompassword')"; mysql_query($sql) or die ("Cannot create a new entry in the Table"); However...
  14. rvr1

    MySQL - Newbie query

    Hi, I am undertaking my first project using PHP and mySQL. What I wish to do is: After a user has completed a form, I wish to query a table to see if a record with the same name exists. If this exists, certain fields in that record should be updated. If a record does not exist, a completely...
  15. rvr1

    Validate Form and give user feedback

    Hi, This is my first PHP web app and I am I getting stuck with this: I have a site where the user logs in under a session. Once logged in, there is a web form that has to be filled out. I have a script that validates the input, but I am having problems giving feeback to the user. What I...
  16. rvr1

    Changing a forms action in PHP

    Hi, I am quite new to PHP and wonder if someone could help me with the following problem. I have a form which contains a drop down menu where the user can select two different values. What I would like to do is change the form action field depending upon which of these values is selected...

Part and Inventory Search

Back
Top