[PHP-DB] more detail..passing array_var with $_get
Hi all, sorry for making a little mess up just now.. My problem is I want to pass var array with $_get.. eg : $a=array() then i pass to other pages www.main.com?b=$a after that echo $b the result is array... just that... I want to make a product quotation so my purpose is that i add all product 1 by 1 in my local pc then just adding to database in server at once... the best way is using array right?? if i using session then it just the same result thanx
Re: [PHP-DB] more detail..passing array_var with $_get
Just make sure that you type $_GET $_SESSION $_POST these variables are case sensitive. I was stumped for a week because of this problem. BenT Sukanto Kho wrote: Hi all, sorry for making a little mess up just now.. My problem is I want to pass var array with $_get.. eg : $a=array() then i pass to other pages www.main.com?b=$a after that echo $b the result is array... just that... I want to make a product quotation so my purpose is that i add all product 1 by 1 in my local pc then just adding to database in server at once... the best way is using array right?? if i using session then it just the same result thanx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] more detail..passing array_var with $_get
From: Sukanto Kho [EMAIL PROTECTED] My problem is I want to pass var array with $_get.. eg : $a=array() then i pass to other pages www.main.com?b=$a after that echo $b the result is array... just that... $safe = urlencode(serialize($a)); $url = http://www.main.com/?b=$safe;; ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] more detail..passing array_var with $_get
I thought I would mention that if you just echo or print an array, just the word array is shown. If you do a var_dump($myArray) on the array, the values should be shown. Otherwise you can get the values as follows: $myArray = $_GET[b]; //then get and print values foreach( $myArray as $num = $val ) { echo $valbr /; //or do whatever with the value -- add to db, etc. } --Nicole --- Nicole Swan Web Programming Specialist Carroll College CCIT (406)447-4310 -Original Message- From: Sukanto Kho [mailto:[EMAIL PROTECTED] Sent: Monday, April 26, 2004 3:55 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] more detail..passing array_var with $_get Hi all, sorry for making a little mess up just now.. My problem is I want to pass var array with $_get.. eg : $a=array() then i pass to other pages www.main.com?b=$a after that echo $b the result is array... just that... I want to make a product quotation so my purpose is that i add all product 1 by 1 in my local pc then just adding to database in server at once... the best way is using array right?? if i using session then it just the same result thanx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php