Jump to content

dink87522

Members
  • Posts

    142
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Sydney, Australia

dink87522's Achievements

Member

Member (2/5)

0

Reputation

  1. I removed the strip tags etc although no go still. Okay, is there another tutorial/example of thsi somewhere (the PHP official site is often hard to understand I think) as I just can't get it working. Or is there another method I could do this?
  2. Learn Python. Seriously.
  3. Okay, I don't get it. My form now looks like <input type='submit' name='Pay[60]' id='Pay[60]' value='Pay' /> <input type='submit' name='Pay[60]' id='Pay[89]' value='Pay' /> <input type='submit' name='Pay[60]' id='Pay[95]' value='Pay' /> etc My processing form part look like: $ID = strip_tags($_POST['Pay']); $ID = mysql_real_escape_string($ID); $ID is coming through as an array although I can't get/find the array contents (using print_r only gives "Array"). I even tries $ID[0] and $ID[1' etc although had no luck. What am I doing wrong???
  4. I still don't really get it I don't think. I don't know what the id numbers will be though.
  5. Okay, so I have a page with a heap of fields and buttons on it (and want to keep it like that really) inside one form. Layout Box 1 Button 1 Box 2 Button 2 Box 3 Button 3 Box 4 Button 4 etc... Box 1 is called 'amount1$id' Box 2 is called 'amount.$id' where $id is the $id of the data being displayed etc So a sample form may look like Box: "amount22" Button: "Pay22" Box: "amount25" Button: "Pay25" Box: "amount32" Button: "Pay32" Box: "amount39" Button: "Pay39" Box: "amount420" Button: "Pay420" Its working fine up to that point. My problem now is that I can't work out how to get that id number from the form once submitted. If I could get the button name somehow I could do it, although I don't know the button or box names when writing the processing script. I could use a loop and check if button1 to buttonX was posted etc, although if there is a large number of entries in the database, then that starts to become a problem. Thoughts?
  6. print_r: [payAmount22] => -3885 That is printed right above my code above, nothing else is changing it after that.
  7. $amountBoxName = "amount".$id; // Constructs the name of the input field $amountToPay = strip_tags($_POST["$amountBoxName"]); $amountBoxName then goes to 'amount22' says, however $amountToPay is then showing also as 'amount22', not getting the value of the text field whose name/id is amount22 on the previous page. How do I do this? I tried having " around the $amountBoxName, ' and no quotes although still can't get it working.
  8. I do what you have got there and just echo the variable as part of the message to be sent and it works for me. Are you sure $code is not empty?
  9. I don't get it, I am echoing the variable before overwriting it again though aren't I?
  10. $a = $landSellCheck[0]; echo("<p>a: $a"); $a = $landSellCheck[1]; echo("<p>a: $a"); $a = $landSellCheck[2]; echo("<p>a: $a"); $i = 0; $landSellCheck = $landSellCheck[$i]; echo("<p>b: (0): $landSellCheck"); $i = 1; $landSellCheck = $landSellCheck[$i]; echo("<p>b: (1): $landSellCheck"); $i = 2; $landSellCheck = $landSellCheck[$i]; echo("<p>b: (2): $landSellCheck"); As can be seen from the output below when I echo my array by manually inserting the index number, it works fine as it should. If I set the index number as a variable and echo it, it works for index value 0, for index value 1 is gives 'a' somehow (no idea where that comes from) and for index value 2 it is empty. What am I doing wrong? Output is: a: landSellConfirm7 a: landSellConfirm6 a: landSellConfirm1 b: (0): landSellConfirm7 b: (1): a b: (2):
  11. Okay, I actually had read that page before lol although after reading it again do not still understand it I don't think. Tizag tutorials are normally excellent although I found other websites more clearer in this case. I got it owrking using $query = "SELECT * FROM playerFinanceTransactions, playerFinanceCategories, Users WHERE playerFinanceTransactions.categoryID = playerFinanceCategories.categoryID AND playerFinanceTransactions.userID = Users.userID AND Users.userID = '8' AND playerFinanceTransactions.categoryID = '3'"; Thanks for your help!
  12. Can anyone see the problem with the query?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.