Jump to content

$_POST not working


KillZoneZ
Go to solution Solved by Ch0cu3r,

Recommended Posts

So, i've been trying to make a browser game, so i created a page with a email input so people can register to the closed beta. Then i created another php page to basically say "An email will be sent to (Email inputed on previous page here) if you are selected to (...)", so i came up with this:

 

First Page (Where the Email is Inputed) Code:

<form method="post" action="BetaRegistration.php">
<input type="email" id="email" name="email" placeholder="Type your E-mail Address here" value="<?= isset($_POST['email']) ? htmlspecialchars($_POST['email']) : '' ?>"required="required"/>
<input name="submit" type="submit" value="Sign Up" id="SignUpButton"/></form>

Second Page (Where the email inputed in the previous page is displayed):

<p id="Introduction">An email will be sent to <strong<?php if(isset($_POST['submit'])) {
  echo htmlspecialchars($_POST['email']);
}?></strong> if you are selected to play in the Closed Alpha. Thank You!</p>

However, it doesn't work! In the second page it doesn't display the e-mail :( I really need help i'm new to PHP

 

Thank You!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.