Changes made in Admin side sholut be shown in Client page??
Hi,
How can I see changes made by admin in the client page?What exactly I want is that I have few events in admin side when admin selects any of them the selected event must be viewed in the client page..How can I do that...Any help?
Suhacini
Junior Poster in Training
90 posts since May 2008
Reputation Points: 10
Solved Threads: 0
How can i do tht?Can i use Enum in my database?DB i use is 'MySQL'.
Suhacini
Junior Poster in Training
90 posts since May 2008
Reputation Points: 10
Solved Threads: 0
I used insert command..but i got an error.What eactly i want is in admin side i have few events and checkboxes.If i check those boxes the checked events shuld be displayed on the client page.so i worte my code like this
<form action="user.php" method="post">
<?php
$str="SELECT * FROM eventdesc ";
$res=mysql_query($str);
if(mysql_num_rows($res)!=0)
{
while($data=mysql_fetch_array($res,MYSQL_ASSOC))
{
echo '<tr> <td>'. $data['eventdesc'].'</td> <td> <input type="checkbox" name="chkbx[]" ></td></tr>';
}
}
mysql_close();
?>
<tr><td align="right"><input type="submit" Value="Display"></td></tr>
user.php
$str= foreach($_POST["chkbx"] AS $key => $value){
"INSERT INTO eventdesc(show) VALUES
('{$_POST["chkbx"][0]} {$_POST["chkbx"][1]} {$_POST["chkbx"][2]} {$_POST["chkbx"][3]} {$_POST["chkbx"][4]} {$_POST["chkbx"][5]} {$_POST["chkbx"][6]} {$_POST["chkbx"][7]} {$_POST["chkbx"][8]} {$_POST["chkbx"][9]} {$_POST["chkbx"][10]} {$_POST["chkbx"][11]} {$_POST["chkbx"][12]} {$_POST["chkbx"][13]} {$_POST["chkbx"][14]} {$_POST["chkbx"][15]} {$_POST["chkbx"][16]} {$_POST["chkbx"][17]} {$_POST["chkbx"][18]} {$_POST["chkbx"][19]} {$_POST["chkbx"][20]} {$_POST["chkbx"][21]} {$_POST["chkbx"][22]} {$_POST["chkbx"][23]} {$_POST["chkbx"][24]} {$_POST["chkbx"][25]} {$_POST["chkbx"][26]} {$_POST["chkbx"][27]} {$_POST["chkbx"][28]} {$_POST["chkbx"][29]} {$_POST["chkbx"][30]} {$_POST["chkbx"][31]}')");
}
$res=mysql_query($str);
if($res)
echo 'Success';
else
echo 'Failure';
mysql_close($con);
?>
And this is the error i got:
Parse error: syntax error, unexpected T_FOREACH in C:\Program Files\xampp\htdocs\exphp\user.php on line 6
What I must do now?
Suhacini
Junior Poster in Training
90 posts since May 2008
Reputation Points: 10
Solved Threads: 0
I have changed code as u have given...but nothing of use... :(
Suhacini
Junior Poster in Training
90 posts since May 2008
Reputation Points: 10
Solved Threads: 0
Is thr any other way to go on with this... Dono wht is wrong even this code is not working...
Suhacini
Junior Poster in Training
90 posts since May 2008
Reputation Points: 10
Solved Threads: 0