Wow, so this is awkward. This is supposed to be another boring web form. I have already done a lot, but for some reason this particular one does not want to cooperate. Did I miss something? I tried to figure this out for hours. I swear I tried to eliminate everything without luck.
Basically, I'm trying to send a PHP file via $ _POST. In the end I will use AJAX, but now I canβt even get a dumb POST. Therefore, when you click the "Submit" button, it goes to the correct page. But I get the error "Undefined Index (then points to the line that I call the variable $ _POST). I commented everything on the PHP side (signup1.php), so now all it does is var_dump($_POST); so I see the data and it doesnβt receive anything from _POST, the stupid thing is empty. I really think the problem is on the HTML side. I will definitely lay out my code. It has a ton of additional sections for styles and layouts. I am going to save all this there, just in case, this is the cause of the error, maybe one of you will find out.In addition, you may notice that I'm using th the bootstrap. Maybe it's something? I used to bootstrap forms earlier and it worked, but who knows.
<form action="actions/signup1.php" method="post"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="name">Name:</label> <input type="text" id="name" class="form-control" placeholder="John Smith"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="phone">Phone Number:</label> <input type="text" id="phone" class="form-control" placeholder="801-321-9876"> </div> </div> </div> <div class="row"> <div class="col-md-6 column-sm-12"> <div class="form-group"> <label for="email">Email Address:</label> <input type="text" id="email" class="form-control" placeholder=" johnsmith@me.com "> </div> </div> <div class="col-md-3 col-sm-6"> <div class="form-group"> <label for="city">City:</label> <select id="city" class="form-control"> <option>Las Vegas</option> <option>Salt Lake City</option> <option>I'll Choose a Default Later...</option> </select> </div> </div> <div class="col-md-3 col-sm-6"> <div class="form-group"> <label for="type-of-phone">Type of Phone:</label> <select id="type-of-phone" class="form-control"> <option>iPhone</option> <option>Android</option> <option>Windows Phone</option> <option>Blackberry</option> <option>Other Cellphone</option> <option>Landline</option> </select> </div> </div> </div> <div class="row"> <div class="col-md-12"><input type="submit" value="Submit"></div> </div> </form>
If anyone has any ideas please let me know. I pull my hair out. I decided that I would be up all night with the problems associated with querying the database, or messing around with AJAX to make it polished, but instead I can't even go past the form representing the RAW data! Very frustrating. I hope someone there can see the problem.
For the record, this is my exact message after the form is redirected to signup1.php (yes, this goes to the correct page). In PHP, all I do is Var_dump the entire $ _POST variable.
var_dump($_POST);
And it shows me the following:
array(0) { }
source share