User Profile

Collapse

Profile Sidebar

Collapse
kadeous
kadeous
Last Activity: Jun 7 '10, 03:49 AM
Joined: Jun 3 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I did it using a while loop, worked perfectly! TY though!!
    See more | Go to post

    Leave a comment:


  • PHP How do you update individual records based on WHERE condition?

    I am updating records using a cron job that works perfectly fine. The issue I have is that the script is updating all records using the information from the first row matching my WHERE condition.

    I'm using the following to query the database for data.

    The row I'm searching for information from is time in the database, and mtime is a row that holds max time for the test.
    Code:
    $query = "SELECT * FROM info
    ...
    See more | Go to post

  • Edit: I see what you were saying about handling the output, your right. I need to change the way I'm working with the variables. Will try and report back.. Thanks to both of you I think it just might work ;)

    Edit 2: It worked! I wasn't using the form data correctly, and from looking back over the entire script, I wasn't far off from getting it to actually work! Learning is so much fun THANK YOU both soooo much!
    See more | Go to post

    Leave a comment:


  • This input passes down the user quantity typed in next to the submit button.

    Code:
    <input type=\"text\" id=\"wq\" name=\"wq\" SIZE = 4 MAXLENGTH = 4>
    This new line was added to assign the ID for the row to the input as hidden.

    Code:
    <input type=\"hidden\" id=\"product\" name=\"product\" value=\"%s\">
    So wq and product...
    See more | Go to post

    Leave a comment:


  • Based off of the value of wq and product. They are sent into a if statement, values are compared to customer currency and then either successful purchase or failed purchase.

    I think once the individual rows that are printed have the id tag assigned to them it would work. I just can't figure that out.
    See more | Go to post

    Leave a comment:


  • Halo, thanks for taking the time to look into this for me. I did as you requested and each item has a unique ID in the database. $row['w_id'] so I added that code as you specified reloaded and tried again.

    It still selects the last row for some reason. Let me know what else to give a try with.

    EDIT: It is now assigning the row id to the %s value.
    See more | Go to post

    Leave a comment:


  • That does the same thing.

    What I'm trying to do is display data from the table into 5 rows with LIMIT, I'm using echo to display the information how I want it laid out. If the user clicks submit on that row then the rest of the code takes it and makes the purchase. But at the current point it only uses row 5 I presume because that's the last row and the submit button only works for that even though it repeats under each row of output....
    See more | Go to post

    Leave a comment:


  • When the data is displayed to the browser everything works as it should.

    When user clicks the submit button under each row it will choose row 5 no matter what.

    I want the user to be able to click the 1st row submit button and continue to purchase.
    See more | Go to post

    Leave a comment:


  • Thanks for taking a look at it, I'm still trying to figure out how to get it working. I'm not sure how to make a different form for each of the outputs in the loop.

    Any suggestions?

    Edit: Forgot to mention it defaults to the last row and does what it should when I click submit.
    See more | Go to post

    Leave a comment:


  • While loop using mysqli_fetch_array with submit buttons

    Greetings,

    Currently my code is arranged in this nature, and please excuse me for being so new, I'm learning! :) So no laughing at my echo's as I don't know much about tables yet.

    The issue I have is that I am using a while loop to display 5 rows of data from the mysql database. However when I put a submit button in the loop it will loop it 5 times properly but when any of the submit buttons are clicked it will default...
    See more | Go to post
No activity results to display
Show More
Working...