Hi..guys!I have several pages which supposed to execute in sequential order,reserve.php,reserve2.php,reserve3.php,...How could I resolve them in same address as reserve.php and execute in proper order?Thanks...
Hi..guys!I have several pages which supposed to execute in sequential order,reserve.php,reserve2.php,reserve3.php,...How could I resolve them in same address as reserve.php and execute in proper order?Thanks...
Using includes probably or even a simple iframe.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Let said I have a button in first page to link to later pages
how can I use include() at here?Code:<input name="continue" type="button" id="continue4" value="Continue" onclick="window.location='reserve2.php'">
Simply continue to use that code to include the next page. I Personally think your best bet would actually be to use an iframe or just combine the other files into reserve.php.Code:if (isset($_POST['continue'])) { include_once('reserve2.php'); }
Hope this helps.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Use a session.
<?php
session_start();
$_SESSION['n'] = @$_SESSION['n']+1;
include('reserve'.$_SESSION['n'].'.php');
?>
EDIT: posted at the same time. Either way could work. testingsite's option would give more control. Mine is simpler, if you really just want it to run a new page on each load, without any confirmation/control.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Actually I want it to be executed in proper order so user can't simply type reserve2.php,it must go through it from the first page,reserve.php
My code will do that, but start from reserve1.php.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Oh..Thanks..how to reset the "n",every time I open reserve.php,its value keep growing and said that warning that failed to include('reserven.php')
On the last page, you may want to unset the session like so:
Hope this helps.Code:unset($_SESSION['n']);
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Let said I have 2 pages right now,reserve,reserve2.php,when session reset,why these 2 pages are combined into one page with first page topped by last page??
Bookmarks