Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/29/2020 in all areas

  1. Actually, I'll make a new topic in an SQL Forum... as I don't think this is a PHP issue any more. Thanks guys
    1 point
  2. Good luck with your studies.
    1 point
  3. So you have 2 items you can work on. The first was brought up by benanamen, which is really a syntax issue. You are not referencing arrays correctly: // Use this if (isset($_POST['itemName']) { // Not this if (isset($_POST{'itemName'}) { That is not the source of your current problem however. Your current problem is that whatever javascript you have that you assume is making your form valid, is not valid, so your text field is not being passed when the form is posted. Another good debugging tool is to use something like chrome dev tools, and look at the network tab when you submit the form. You can then see the contents of the post variables as they are sent when you submit the form. In conclusion, right now your problem is your html/javascript code and has nothing to do with PHP. The code is working as you intended, as $_POST['itemName'] is not set/does not exist.
    1 point
  4. You can start by using square brackets in your POST variables instead of curly braces like the rest of us. The curly braces can fail in at least one case. Example: $myArray = [1,2]; $index = 1; echo "value at index $index is $myArray[$index]"; // outputs "value at index 1 is 2" echo "value at index $index is $myArray{$index}"; // will throw "Notice: Array to string conversion" var_dump($myArray{$index}); // outputs "int(2)" https://wiki.php.net/rfc/deprecate_curly_braces_array_access
    1 point
  5. Bitterly disappointed that you need to get your crystal ball out, as an administrator you should know they have bought a Magento 1.0 ecommerce site from theme forest/ebay with a special offer of 42 addons/plugins And what chokes me even more, you have not even offered 2 lines of code to bring the load times down.
    0 points
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.