Jump to content

ptcomp13

Members
  • Posts

    2
  • Joined

  • Last visited

ptcomp13's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. ptcomp13

    @session_start()

    session username not showing session coming from previous page @session_start();echo $_SESSION['username'];echo "userid ".$_SESSION['username'];echo "<br/>";$uu=$_SESSION['username']; ?>
  2. ptcomp13

    @session_start

    <?php@session_start();echo $_SESSION['username'];echo "userid ".$_SESSION['username'];echo "<br/>";$uu=$_SESSION['username']; $pid=$_GET["id1"]; // $_SESSION["keyid"]=$pid; ?> <?php include "connect.php";echo "$uu";// echo 'dgfdf'.$_SESSION["keyid"]; echo "projectid ".$pid;/*$connection = mysql_connect('localhost','root',''); if (!$connection){ die("Database Connection Failed" . mysql_error()); } $select_db = mysql_select_db('test1'); //$select_db = mysql_select_db('test1'); if (!$select_db){ die("Database Selection Failed" . mysql_error()); }*/ $query="select * from bidding where id=".$pid;//echo $query;$data = mysql_query($query,$connection) or die("error");//$glb=1;//$data1=mysql_query($query);while($row=mysql_fetch_array($data)){/*$query="select * from userlogin";echo $query;//$gender=$row['gender'];$_SESSION["uid"]=$row[0];echo $_SESSION["uid"];*/ //$glb=0; ?> <form action="update1.php?id=<?php echo $row["id"] ?>" method="POST" > <input type="hidden" name="pid" value="<?php echo $pid?>" /><input type="hidden" name="id1" id="id1" value="<?php echo $row[0]?>"> <!--input type="text" name="details" value="<?php echo $row[1];?>" /-->title<input readonly="readonly" name="title" value="<?php echo $row[1];?>" />attachment<input readonly="readonly" name="details" value="<?php echo $row[2];?>" /><!--details<input type="text" name="details" value="<?php //echo $row[2];?>" />attachment<input type="text" name="attachment" value="<?php// echo $row[3];?>" /-->amount<input type="text" name="amount" /><!--email<input type="text" name="email"><br/>--><input type="submit" name="check" /><?php//}//$glb=0;//else if($glb=='0')//{//$glb=0;//echo $glb;//$glb=0;?><!--<form action="update1.php?id=<?php// echo $row["id"] ?>" method="POST" > <input type="hidden" name="id1" id="id1" value="<?php //echo $row[0]?>"> <!--input type="text" name="details" value="<?php //echo $row[1];?>" /--><!--title<input readonly="readonly" name="title" value="<?php //echo $row[1];?>" />attachment<input readonly="readonly" name="details" value="<?php //echo $row[2];?>" /><!--details<input type="text" name="details" value="<?php //echo $row[2];?>" />attachment<input type="text" name="attachment" value="<?php// echo $row[3];?>" /--><!--amount<input type="text" name="amount" /><!--email<input type="text" name="email"><br/>--><!--<input type="submit" name="check" disabled="disabled" /><?php // }}//header("location:once.php");/* $qry="select noofbids from bidding where id=".$pid; //echo $qry; $amount=$_POST["p_id"]; $amount1=implode(" ",$amount); // echo $amount1; $amt=explode(' ',$amount1); for($r=0;$r<count($amt);$r++) {print_r ($amt[$r]);} $qrynew=mysql_query($qry,$connection) or die(mysql_error()); while($row=mysql_fetch_array($qrynew)) { //echo $row['0']; $rr=$row['0']+1; $query="update bidding set noofbids='".$rr."' where id=".$pid; //echo $query; $qry=mysql_query($query,$connection) or die(mysql_error()); } $query="insert into userbidding(id,pid,pname,amount) values($user_id)"; $query1=mysql_query($query) or die(mysql_error()); */ ?> it doesnt show session[username] shows 0 for all sessions
×
×
  • Create New...