Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello guys I tried several ways to pass certain data between two pages .
what i do in the first php page, is setting a var value to $var = somthing .

now what i want, is to pass that value on to the next page, which will be written into a label control or somthing . i tried session, querystrings and it seems i dont know how to do this right, please guide me .

example :
PHP
$content = "hello"; //if its not string sholud i cast it??
    
    header('location:sms_main_form.php?credits='.$content);


2nd page:

XML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
 echo $_GET['credits']
?>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>


in the 2nd page it echoes "unknown command"
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900