Jump to content

sanram123

New Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sanram123

  • Rank
    Newbie
  1. in this statement, is it supposed to be "FROM result t" or should it be "FROM result" ?
  2. I tested it again and am not. Thank you so much for your patience! It's grabbing the value now.
  3. Thank you for your patience! I believe you're right. I've been stuck for a few hours. I changed the quotes to: echo ("<td class='text-center'><a class='btn btn-xs btn-primary' href='details.php?id=$id' >Details</a></td>"); And now when I click the link in the URL i see localhost/PHPWork/myfiles/A10/details.php?id=20597 for the details ID that I clicked.
  4. I'm at a total loss. I set up the whole string in double quotes so that PHP evaluates the whole string. The details link was working fine before I added any quotes to the href so I'm not sure how the href is supposed to be set up if it's not single or double quotes or no quotes.
  5. Now I'm getting an error message, I changed the code to : echo ("<td class='text-center'><a class='btn btn-xs btn-primary' "href=details.php?id=$id" >Details</a></td>"); I just tried clicking the details link and received the error message Parse error: syntax error, unexpected 'href' (T_STRING) in "customer.php"
  6. Yes! I used single quotes and now my code looks like: echo ("<td class='text-center'><a class='btn btn-xs btn-primary' 'href=details.php?id=$id' >Details</a></td>"); In my address bar I currently see localhost/PHPClassWork/myfilesname/A10/details.php Where I am testing the code within the details.php file.
  7. I apologize for the issues in my question. I will clarify. I have two files. One is customers.php and the other is details.php. Within the customers.php I have the code echo (" <td class='text-center'><a class='btn btn-xs btn-primary' href=details.php?id=$id >Details</a></td> "); Within the details.php file I have the code $customerID = $_GET['id']; Where I am trying to get the ID from the customer.php file and save it in the $customerID variable.
  8. Yes, what I'm trying to do is to create a variable which I named $customerID that will hold the value of $id within my first statement. I hope that made sense.
  9. I have the following code: echo (" <td class='text-center'><a class='btn btn-xs btn-primary' href=details.php?id=$id >Details</a></td> "); and am trying to pull the value from the customer ID that is passed into $id. I am trying to get the value using : $customerID = $_GET['id']; but it is not working. I get an error message saying Notice: Undefined index: id in "my folder name"
×
×
  • 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.