Jump to content

[SOLVED] [function.session-start]


Matthew Herren

Recommended Posts

Ok i'm trying to make a two page form. My first problem is that i'm trying to store the information from page one in

<?php
session_start();
session_register('name');
session_register('email_address');

$_SESSION['name'] = $_POST['name'];
$_SESSION['email_address'] = $_POST['email_address'];

?>

then i have my form.

<form method="post" action="submit.php">
<input type="radio" group="membership_type" value="Free">
<input type="radio" group="membership_type" value="Normal">
<input type="radio" group="membership_type" value="Deluxe">
<input type="checkbox" name="terms_and_conditions">
<input type="submit" value="Submit">
</form>

But i keep getting the error message

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at/auto/form2.php:2)

Link to comment
https://forums.phpfreaks.com/topic/175622-solved-functionsession-start/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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