Jump to content

file page for session


gongpex

Recommended Posts

Hello everyone, I think all of you understand if on index.php we use include taqs so that when user open another link for example : shop it will show like this on address bar : index.php?page=shop. Of course to show it I need to make file like this content_shop.php. But if I create file like this , when I using session_start() the session won't work. for example : If I buy product on page content_product.php and product shown to content_basket.php Therefore I create basket.php or buy.php so that the session and header can be works. please see this image : step.jpgQ : Actually can I using session , if index.php file using include taq ?(directly on form action="index.php?page=basket" not basket.php at content_product.php please see on image above) N : header taqs same too won't work if I use it on content_product.php or etc please help me :( Thanks_______________________________________________________________________________________________ N : This question still have correlation with my previous post

Link to comment
Share on other sites

can use more than one button submit like delete button on content_product.php in one formsample

<form id="form1" name="form1" method="POST" action="">  <label>  <input type="submit" name="a"   value="a" />  </label>  <input type="submit" name="b"  value="b" />  <input type="submit" name="c"  value="c" /></form><?PHPif (isset($_POST['a'])) { echo 'action=a';}if (isset($_POST['b'])) { echo 'action=b';}if (isset($_POST['c'])) {echo 'action=c';//include('tets.php');}?>

Link to comment
Share on other sites

some of problem

$_SESSION["session_name"];// <---- THIS WORK$_SESSION['session_name'];// <---- THIS WORK$_session["session_name"];// <---- this not work$_session[session_name];// <---- this not work$_SESSION[session_name];// <---- this not work $_POST["var"];// <----THIS WORK$_POST['var'];// <----THIS WORK$_POST[var];// <---- this not work$_post["var"];// <---- this not work $_GET["var"];// <---- THIS WORK$_GET['var'];// <---- THIS WORK$_GET[var];// <---- this not work$_get["var"];// <---- this not work

Edited by kanchatchai
Link to comment
Share on other sites

I don't understand with page using like this index.php?shopping=ok on address bar, I had try to create page like this : index.php then shopping.php and on <form> on actiion I wrote like this : index.php?shopping=ok but it won't show anything, Q : what my mistake?_______________________________________________________________________________ OFF : I had read the topic ZendCon on general, what the mean of this?

Edited by gong
Link to comment
Share on other sites

Hi everyone, I think there is misunderstand here, please come to this site : http://demo.shop-scr.../free/index.php When I click one of the link (exmp : Price list) it's result : http://demo.shop-scr...?show_price=yes on address bar. When I debug on firefox it's using :

<a class="menu" href="index.php?show_price=yes">Price list</a>

Q : how to make file so that it can be shown like page on above using <a href> taq? please answer Thanks___________________________________________________________________________________ S : piyombombombe aling alang aling alang

Edited by gong
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...