1.<?php
2.session_start();
3.$con = mysql_connect("localhost","root","") or die(mysql_error());
4.$db = mysql_select_db("registration", $con)or die(mysql_error());
5.function mss($value){
6. return mysql_real_escape_string(trim(strip_tags($value)));
7.}
8.function s($value){
9. return stripslashes($value);
10.}
11.function topic($input){
12. return nl2br(strip_tags(stripslashes(htmlentities(htmlspecialchars($input)))));
13.}
14.if($_SESSION){
15.if(mysql_query("UPDATE signup SET gender='".$_POST."',status='".$_POST."',date='".$date."',option='".$_POST."',religion='".$_POST."',description='".$_POST."',political='".$_POST."',location='".$_POST."',home='".$_POST."',other='".$_POST."' WHERE id='."$_SESSION."'")){
16.echo"<p>updated successfull</p>";
17.}
18.}
19.else {
20. if (!$_SESSION["uid"]){
21. header("Location:unregistered.php");
22. exit();
23. }
24. }
25. ?>

i got this message, Parse error: syntax error, unexpected T_VARIABLE in update.php on line 15

You put a " (quote) at he wrong place near the end of the statement.

WHERE id=' . "$_SESSION

should be

WHERE id='" . $_SESSION

If you are not using an PHP editor, Netbeans has a PHP editor that would have helped you locate this error.

svilla is right.
Can you please use CODE tags now onwards...

there is error in the 15th line...
In place or your code...

if(mysql_query("UPDATE signup SET gender='".$_POST['gender']."',status='".$_POST['status']."',date='".$date."',option='".$_POST['option']."',religion='".$_POST['religion']."',description='".$_POST['description']."',political='".$_POST['political']."',location='".$_POST['location']."',home='".$_POST['home']."',other='".$_POST['other']."' WHERE id='."$_SESSION['uid']."'")){

Write the following code....

if(mysql_query("UPDATE signup SET gender='".$_POST['gender']."',status='".$_POST['status']."',date='".$date."',option='".$_POST['option']."',religion='".$_POST['religion']."',description='".$_POST['description']."',political='".$_POST['political']."',location='".$_POST['location']."',home='".$_POST['home']."',other='".$_POST['other']."' WHERE id='".$_SESSION['uid']."'")){

PS:-If your problem is solved mark the thread as solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.