You are here: Technology, Web & Business Forum
: Web Development
: Programming
:
Warning: session_start() [function.session-start]
|
Welcome to the Technology, Web & Business Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Programming Discuss programming languages such as .NET, PHP, PERL, ASP, ColdFusion, C++
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
|||
I tried to make a profile update so members can update their information and I tried to embed a php code on my webpage and when I preview it, it says: sex == "male"){ $ckb="Male Female";} else {$ckb="Male Female";} // One form with a hidden field is prepared with default values taken from field. echo . And when I upload it it says: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/dejamad/public_html/signup/update-profile.php:7) in /home/dejamad/public_html/signup/include/session.php on line 2. Only this one does like that but the loin form and register works fine.
Here is the php code: <? include "include/session.php"; include "include/z_db.php"; ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>(Type a title for your page here)</title> <meta name="GENERATOR" content="Arachnophilia 4.0"> <meta name="FORMATTER" content="Arachnophilia 4.0"> </head> <body > <? // check the login details of the user and stop execution if not logged in require "check.php"; // If member has logged in then below script will be execuated. // let us collect all data of the member $row=mysql_fetch_object(mysql_query("select * from plus_signup where userid='$_SESSION[userid]'")); //Let us set the period button based on the data of the sex field // You can see male button is checked if it is set to male // else it is set to female if($row->sex == "male"){ $ckb="<input type='radio' value=male checked name='sex' checked>Male <input type='radio' value=female name='sex'>Female";} else {$ckb="<input type='radio' value=male checked name='sex' >Male <input type='radio' value=female name='sex' checked>Female";} // One form with a hidden field is prepared with default values taken from field. echo "<form action='update-profileck.php' method=post> <input type=hidden name=todo value=update-profile> <table border='0' cellspacing='0' cellpadding='0' align=center width='30%'> <tr bgcolor='#ffffff' > <td colspan='2' align='center'> <font face='verdana, arial, helvetica' size='2' align='center'> <b>Update Profile</b> </font></td> </tr> <tr bgcolor='#f1f1f1'><td ><font face='Verdana' size='2' > Email</td> <td ><input type=text name=email value='$row->email'></td></tr> <tr ><td > <font face='Verdana' size='2' >Name</td> <td ><font face='Verdana' size='2'><input type=text name=name value='$row->name'></td></tr> <tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >Sex</td> <td ><font face='Verdana' size='2'> $ckb</td></tr> <tr bgcolor='#ffffff'><td align=center colspan=2><input type=submit value=Update></td></tr></table>"; <? require "bottom.php"; ?> <center> <br><br></center> </body> </html> |



Linear Mode
