Jump to content

$_POST not working... i can't see why...


jigsawsoul

Recommended Posts

I trying to echo out information from a forum using $_POST but its not working and i can't really see what i have done wrong if anything.

 

form. create-staff.php

<h4>Create Staff Member</h4>
<p>To create a staff member fill out the form below.</p>
<div class="meeting png_bg">
<form action="create-staff-2.php" method="post">
		<p>
			<label>Email:</label>
			<input class="text-input small-input" type="text" id="email" name="email" />
		</p>
		<p>
			<label>Password:</label>
			<input class="text-input small-input" type="text" id="password" name="password" />
		</p>
		<p>
			<label>First Name:</label>
			<input class="text-input small-input" type="text" id="firstname" name="firstname" />
		</p>
		<p>
			<label>Last Name:</label>
			<input class="text-input small-input" type="text" id="lastname" name="lastname" />
		</p>
		<p>
			<input class="button" type="submit" value="Submit" />
		</p>
</form>
</div>

 

php. create-staff-2.php

<?php 

session_start();

include ("../_functions/f_login.php");

sessionAuthenticate( );

$email = $_POST['email'];
$password = $POST['password'];
$firstname = $POST['firstname'];
$lastname = $POST['lastname'];

echo $email;
echo $password;
echo $firstname;
echo $lastname;

?>

:shrug:

 

 

 

Link to comment
Share on other sites

error_reporting(E_ALL);
ini_set('display_errors',1);

 

It will tell you if you have any errors in your script.

 

Also

$email = $_POST['email'];
$password = $_POST['password'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];

Link to comment
Share on other sites

errors ?

Notice: Undefined variable: POST in /home/hr728/public_html/_uni/_admin/create-staff-2.php on line 13

Notice: Undefined variable: POST in /home/hr728/public_html/_uni/_admin/create-staff-2.php on line 14

Notice: Undefined variable: POST in /home/hr728/public_html/_uni/_admin/create-staff-2.php on line 15

 

Link to comment
Share on other sites

i haven't used

 

POST

 

i've only used

 

$_POST

 

as below

<?php 

session_start();

include ("../_functions/f_login.php");

sessionAuthenticate( );

error_reporting(E_ALL);
ini_set('display_errors',1);

$email = $_POST['email'];
$password = $_POST['password'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];

echo $email;
echo $password;
echo $firstname;
echo $lastname;

?>

 

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.