GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 03-Nov-2007, 04:24
manjunath1985 manjunath1985 is offline
New Member
 
Join Date: Nov 2007
Posts: 1
manjunath1985 is on a distinguished road
Unhappy

Problem In Passing Variables


Hi,
I have created php page called sms.php which displays the username retrieved from the database through selecting checkbox.
Here is the code in sms.php:
PHP Code:

<?php
foreach($_POST['check'] as $value) 
{
$check_msg=$value;
echo "message sent to $check_msg";
}
?>
//here 'check' is the name of checkbox//
//<input type =checkbox name=check[]
value=<?$row['username']?>>//
this code displays the username selected from the previous page.
But i want to pass these variables to another page called demo.php from sms.php page and display the same.
Plz help me out......
Last edited by LuciWiz : 03-Nov-2007 at 09:29. Reason: Please insert your Php code between [php] & [/php] tags
  #2  
Old 10-Nov-2007, 19:52
MonkOfox MonkOfox is offline
New Member
 
Join Date: Nov 2007
Posts: 21
MonkOfox is on a distinguished road

Re: Problem In Passing Variables


best way to get variables from page to page in php is to either create a file with the variabes, with a final variable which is a flag.

you could also do this with a database.

so when you load the page, you would have a function that would see if either the file or databases rows or last line(in the file) boolean flag is true
or false to see if it is set, if so, read them in and do as you wish.

this may come off very cumbersome, but thats the way i've done it in the past. I dont really know of any other way.

you could also make a form with 'hidden' inputs and put the variables in those inputs, then just submit those to another page.

MonkO
 
 

Recent GIDBlogFlickr uploads of IA pictures by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
passing variables out of an iframe by url JUNK KED MySQL / PHP Forum 5 31-Jul-2007 09:33
Globalizing member variables to avoid passing to member functions... jondean C++ Forum 13 14-Aug-2006 00:44
Question Passing Variables (Visual Basic & HTTP) pcxgamer Open Discussion Forum 0 28-Feb-2006 00:46
Problem Passing Pointer in return..(Possibly) Pr0fess0r C Programming Language 5 28-Jun-2005 23:54
Apache on Windows XP and passing variables Jos Elkink Apache Web Server Forum 4 21-Nov-2003 02:21

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 13:14.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.