How to get first page??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aris1234
Forum Newbie
Posts: 11
Joined: Mon May 07, 2007 7:10 am

How to get first page??

Post by aris1234 »

Hi All...


my page sample like this :

i have student.php, in this code have :

Code: Select all

<form action="proces.php" Method="POST">
   .....
   .....
  <input type="submit" value="save">
</form>
in proces.php have code to redirect to student.php
like this : header( 'Location: student.php');

after klik save in student.php i have get that page (student.php) but that page is blank

how get that page (student.php) ???

please help me..i'm nubie :oops:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

please try

Code: Select all

error_reporting(E_ALL);
ini_set('display_errors', true);
header('Location: student.php');
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

Instead of using process.php you could submit the form to the itself (student.php).

At the top of you script you can check whether a user has clicked "Save" like this:

Code: Select all

if(isset($_POST['submit']))
Inseide the IF statement you can validate the form values.
Post Reply