f



Send array from php to php

HI every one
I' try to send array from web page to php file
but no data are show
I'm using session to store data
and this is my code
////////////////////////////////////////////////////////////////////////
$data = $cart_items;
	session_register('data');
  foreach ($cart_items as $cart_item) {
    echo "<tr>";
    echo " <td><span class='style2'>".$cart_item->name."</span></td>";
    echo " <td><span class='style2'>".$cart_item->description."</
span></td>";
    echo " <td><span class='style2'>".$cart_item->price." S.R.</span></
td>";
	echo " <td><span class='style2'>".$cart_item->quantity."</span></
td>";
	echo " <td><span class='style2'>".$cart_item->price * $cart_item-
>quantity."</span></td>";
    echo " <td><span class='style4'><a href='order.php?action=del&id=".
$cart_item->object_id."'>[del]</a></span></td>";
    echo "</tr>";
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\

and this is my php code to get the data
////////////////////////////////////////////////////////
<?php
foreach ($data as $item)
{
echo "<tr>";
print " <td><span class='style2'>".$item->name."</span></td>";
echo " <td><span class='style2'>".$item->description."</span></td>";
echo " <td><span class='style2'>".$item->price." $</span></td>";
echo " <td><span class='style2'>".$item->quantity."</span></td>";
echo " <td><span class='style2'>".$item->price * $cart_item-
>quantity."</span></td>";
echo "</tr>";
}
?>

\\\\\\\\\\\

whene this code is runing
it create table white correct number of row but no data is show
can any one help me white this
I will be thankful
Salim
0
sahm007 (51)
1/19/2008 9:58:10 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

1 Replies
2009 Views

Similar Articles

[PageSpeed] 59

..oO(sahm)

>I' try to send array from web page to php file
>but no data are show
>I'm using session to store data
>and this is my code
>////////////////////////////////////////////////////////////////////////

Call session_start() at the beginning of each(!) page.

>$data = $cart_items;
>	session_register('data');

session_register() is deprecated. Simply use the $_SESSION array
instead:

$_SESSION['data'] = $cart_items;

>and this is my php code to get the data
>////////////////////////////////////////////////////////

session_start();

><?php
>foreach ($data as $item)

foreach ($_SESSION['data'] as $item) {
  ...
}

Also check your error_reporting directive in your php.ini (set it to
E_ALL|E_STRICT) and register_globals (should be off).

Micha
0
netizen9200 (1826)
1/19/2008 10:52:46 AM
Reply:

Similar Artilces:

PHP Training Institute In Delhi, Live Projects on PHP. Short Term PHP Courses, PHP Scripts, PHP Training with Live Projects.
Vserve Global offers short term PHP: Hypertext Preprocessor Training Course, which is a widely used, general-purpose scripting language that was originally designed for web development, to produce dynamic web pages. It can be embedded into HTML and generally runs on a web server, which needs to be configured to process PHP code and create web page content from it. It can be deployed on most web servers and on almost every operating system and platform free of charge.PHP is installed on over 20 million websites and 1 million web servers. TOPICS:- >> Core PHP Language >> HTML, Cascad...

php to php obj
Hi All, Is there any tool to convert the .php files into its object files in deploying the files to other's server like java classes are deployed? Thanks in advance --AR John7481 <arjohn7481@hotmail.com> wrote or quoted: > Is there any tool to convert the .php files into its object files in > deploying the files to other's server like java classes are deployed? To what end? Do you want a PHP obfuscator? They tend not to be needed - since the code remains on the server. Do you want a PHP squeezer? Again - since PHP remains on the server that is of reduced importance. PHP obfuscators and squeezers are out there - but what exactly are you looking for? -- __________ |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply. With total disregard for any kind of safety measures Tim Tyler <tim@tt1lock.org> leapt forth and uttered: > John7481 <arjohn7481@hotmail.com> wrote or quoted: > >> Is there any tool to convert the .php files into its object >> files in deploying the files to other's server like java >> classes are deployed? > > To what end? > > Do you want a PHP obfuscator? They tend not to be needed - > since the code remains on the server. > > Do you want a PHP squeezer? Again - since PHP remains on the > server that is of reduced importance. > > PHP obfuscators and squeezers are out there - but what exactly > are you looking for? I think he'...

PHP within PHP...
I took over the support of a website that is set up something like this inside one of the pages: include_once("header.php"); <?php //to get the content of the page they do this: $content = mysql_query("select content etc...); echo $content; ?> include_once("footer.php"); I am having problems evaluating any php that is used in the mysql content. Is there a way to get the mysql withing the mysql to run? Thank you for your time, Mandragon On Sep 17, 12:56 pm, Mandrago...@gmail.com wrote: > I took over the support of a website that is set up something like > this inside one of the pages: > > include_once("header.php"); > > <?php > //to get the content of the page they do this: > $content = mysql_query("select content etc...); > > echo $content; > ?> > > include_once("footer.php"); > > I am having problems evaluating any php that is used in the mysql > content. Is there a way to get the mysql withing the mysql to run? > > Thank you for your time, > > Mandragon Sorry, The question should read: "Is there a way to get the php withing the echo $htmlcontent to run?" Of course you are, $content is a resource. The MySQL Query resource. try this: $content = mysql_query('bla bla bla'); while ($row = mysql_fetch_assoc($content)) { $result[] = $row; } $content = $result; Now you can use $content ;). In answer to your edit... eval($co...

php outside php (?)
Sounds weird, i know. What i want/wonder is the following: PHP can do the next: <?php if($foo == 'bar') { ?> Ow yeah, foo is bar! <?php }; ?> But how can i do the following: <?php $foo= ?> this is what foo looks like. <?php }; ?> This way i could edit the content of $foo in DW's design-view. I hope it's clear enough for you all to understand... Greetings frizzle. frizzle wrote: > But how can i do the following: > > <?php > > $foo= > > ?> > this is what foo looks like. > <?php > > }; > > ?> > > This way i could edit the content of $foo in DW's design-view. > I hope it's clear enough for you all to understand... <?php ob_start(); ?> this is what foo looks like. <?php $foo=ob_get_clean(); ?> -- Justin Koivisto - justin@koivi.com http://koivi.com Wow, little late on the reply, but i still wanted to thank you for your help. This is exactly what i meant, and it works great! :D Thanks again. ...

Best PHP Training | PHP Development Training | PHP Training Institute
Tops Technologies provides php and mysql certification courses in ahmedabad, baroda, surat, Rajkot, Udaipur, Gujarat, india.PHP Training with MySQL is an introductory course in the PHP and MySQL technology. Mysql and php training course, php for beginners, sql training courses, PHP Training courses, php courses, mysql training courses, php mysql course. For More Details :- http://www.tops-int.com ...

Does PHP need the .php extension ?
Hi guys, When I use PHP I give my file the .php extension. I always wondered if it could be an .htm page with a <script> block that the PHP resides in, the same way you would do JavaScript. If you can do it that way are there any benifits to that method ? Take care, Cyrus "Cyrus D." <satan@invalid.org> writes: > Hi guys, > > When I use PHP I give my file the .php extension. I always wondered if it > could be an .htm page with a <script> block that the PHP resides in, the > same way you would do JavaScript. If you can do it that way are the...

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my ....

PHP with Indian PHP Developers
Dear all, If you want to make a PHP web application, or need to <a href="http:// www.virtueinfo.com/php-developers/hire-php-programmers-developers-india.htm">Hire PHP Developer</a>contact a leading <a href="http://www.virtueinfo.com/ php-developers/php-web-development.htm"> PHP Web Development Compnay</ a> <a href="http://www.virtueinfo.com/php-developers/php-web-programming- php-developers-india.htm">Offshore PHP web development India</a> On Thu, 25 Feb 2010 01:37:02 -0800 (PST), Virtue Info wrote: > Dear all, > > > If you want to make a PHP web application, or need to <a href="http:// > www.example.com/php-developers/hire-php-programmers-developers-india.htm">Hire > PHP Developer</a>contact a leading <a href="http://www.example.com/ > php-developers/php-web-development.htm"> PHP Web Development Compnay</ > a> > > ><a href="http://www.example.com/php-developers/php-web-programming- > php-developers-india.htm">Offshore PHP web development India</a> > Third time's the charm? Not exactly a ringing endorsement of the skills you've got available or your testing method reliablity... -- 12. One of my advisors will be an average five-year-old child. Any flaws in my plan that he is able to spot will be corrected before implementation. --Peter Anspach's list of things to do as an ...

php://memory and php://temp
http://php.net/manual/en/wrappers.php.php per the documentation: php://memory and php://temp are both listed under "Allows Appending" what am I missing / what's the point? They only seem to work with read/write modes such as fopen('php://memory','rw'); closing the handle, or trying to open another handle without closing the first essentially erase the contents... so what's the point of fopen('php://memory','a') ? you'll a) be appending nothing, b) no way to read what you just wrote? sure would be nice if you could $fh = fopen('php://memory', 'w'); fwrite($fh, 'test string'); fclose($fh); $fh = fopen('php://memory', 'r'); $result = fgets($fh,2048); fclose($fh); echo $result; On 10/12/2010 9:44 PM, BKDotCom wrote: > http://php.net/manual/en/wrappers.php.php > per the documentation: php://memory and php://temp are both listed > under "Allows Appending" > > what am I missing / what's the point? > > They only seem to work with read/write modes such as > fopen('php://memory','rw'); > > closing the handle, or trying to open another handle without closing > the first essentially erase the contents... so what's the point of > fopen('php://memory','a') ? > you'll > a) be appending nothing, > b) no way to read what you just wrote? > > sure would be nice if you could > > $fh = ...

how to use the PHP path to send something explicitly to the PHP parser?
Hi. I'm messing around with some stuff in an .htaccess file. Among other things, I'd like to send my html files to the PHP parser. I'd also like to rewrite the urls using Apache mod_rewrite, so that the query string disappears, but the variables are still recorded. For all these tasks, I need to know the PHP path. When I run phpinfo, I see this listed as the Path: PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin I'm not sure how to use that infomation. Do I use all of it? Some of it? lkrubner@geocities.com wrote: > Hi. I'm messing around with some ...

Php constants in php.ini
I am trying to set user_agent = PHP_VERSION in php.ini. In my php.ini the instructions say that you can use constants in the php.ini file. The only constants I can get to work, though, are the error level constants like E_ALL, E_ERROR, E_WARNING, etc., ... Is anyone aware of some sort of trick to getting others to work? (I was thinking it would be nice to have the user agent string used by my Php scripts to use PHP_VERSION in the string.) -- ***************************** Chuck Anderson • Boulder, CO http://www.CycleTourist.com Integrity is obvious. The lack of it is common. *****...

php notification through php sdk
Hi there I want to build a e-commerce website similar to wish.com and I have chosen opencast as my framework of choice. Now wish has a feature that when you save a product in wish and if you are logged in with Facebook or gmail all of your friends will get a notification that your friends has saved a item on wish. I want a similar feature on my site Now I know Facebook provide a sdk JavaScript and php and wish might be using something similar but I am using open cart can I open home page or product page in the sdk Thanks On 3/20/2015 7:30 AM, apoorv.kanungo@gmail.com wrote: &g...

why does $_SERVER['PHP_SELF'] say /test.php/test.php for test.php?
I have a PHP script at 127.0.0.1/test.php. It's contents are as follows: <?php echo $_SERVER['PHP_SELF']; ?> And it's output isn't test.php, as I'd expect, or /test.php, but rather, /test.php/test.php. Why? And how do I fix it? El 06/10/2010 6:53, yawnmoth escribi�/wrote: > I have a PHP script at 127.0.0.1/test.php. It's contents are as > follows: > > <?php > echo $_SERVER['PHP_SELF']; > ?> > > And it's output isn't test.php, as I'd expect, or /test.php, but > rather, /test.php/test.php. Why? And how do I fix it? What output do you get if you change it to this? <?php echo '[' . $_SERVER['PHP_SELF'] . ']'; ?> What do your other $_SERVER values look like? <?php print_r($_SERVER); ?> -- -- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain -- Mi sitio sobre programaci�n web: http://borrame.com -- Mi web de humor satinado: http://www.demogracia.com -- On 06/10/10 09:30, "�lvaro G. Vicario" wrote: > El 06/10/2010 6:53, yawnmoth escribi�/wrote: >> I have a PHP script at 127.0.0.1/test.php. It's contents are as >> follows: >> >> <?php >> echo $_SERVER['PHP_SELF']; >> ?> >> >> And it's output isn't test.php, as I'd expect, or /test.php, but >> rather, /test.php/test.php. Why? And how do I fix it? > > What output do you get if you change it ...

php
hi all iv extracted a phptimesheet on my system but the webserver is not able to show the documents in html format...i mean..the <?php headers are also visible on the page... can any one help me out with this. linuxadmin wrote: > hi all > > iv extracted a phptimesheet on my system but the webserver is not able > to show the documents in html format...i mean..the <?php headers are > also visible on the page... > > can any one help me out with this. It sounds like a configuration error with your webserver---it would seem that it's not interpreting PHP files...

PHP
Hi I bought the PHP templates last winter and was trying to experiment with these web templates. I need the adaob 4.53 for PHP as indicatedf in the PHP manuals. The official site does not have it any more. Does anyone this zip file please ? If so, contact me at spiterijesmond@yahoo.co.uk If you use latest versions, the examples in the tutorials will not work as they should. Thanks Jesmond Jesmond: Some minutes ago I sent the file to your email Francisco jesmond.spiteri@visitmalta.com ha escrito: > Hi > I bought the PHP templates last winter and was trying to experiment > with these web templates. I need the adaob 4.53 for PHP as indicatedf > in the PHP manuals. > The official site does not have it any more. > Does anyone this zip file please ? If so, contact me at > spiterijesmond@yahoo.co.uk > If you use latest versions, the examples in the tutorials will not work > as they should. > > Thanks > Jesmond ...

php
Hi Guys, Installed FreeBSD 5.1;fine Got Apache2, MySQL working. Installed php 4.3.4 ok Try to run phpMyAdmin (latest version), but somehow there isn't anything generated. Am I overlooking something? Like installing a lib? Any nfo is welcome Henk Lutgerink http://avatar.demon.nl henk lutgerink wrote: > Hi Guys, > > Installed FreeBSD 5.1;fine Got Apache2, MySQL working. > Installed php 4.3.4 ok > Try to run phpMyAdmin (latest version), but somehow there isn't anything > generated. > Am I overlooking something? > Like installing a lib? You don't say whether you've installed the phpMyAdmin port. (In /usr/ports/databases.) -- Bob London, UK echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk" Robert Downes wrote: > henk lutgerink wrote: >> Hi Guys, >> >> Installed FreeBSD 5.1;fine Got Apache2, MySQL working. >> Installed php 4.3.4 ok >> Try to run phpMyAdmin (latest version), but somehow there isn't anything >> generated. >> Am I overlooking something? >> Like installing a lib? > > You don't say whether you've installed the phpMyAdmin port. (In > /usr/ports/databases.) yes, I did install phpMyAdmin in /usr/ports/database. I got the feeling I still have to ./configure, make, make install? If so Please let me know. ps: server is running on http://avatar.demon.nl henk lutgerink wrote:...

US-CA: Los Angeles-Web Developer - PHP Developer - PHP Programmer - PHP
************************************************************** JobCircle.com is the largest regional job board in the Mid-Atlantic region, with tens of thousands of job offerings in PA, NJ, DE, MD, NY, and Washington D.C. To learn more, visit http://www.jobcircle.com?source=ng ************************************************************** Job Title: Web Developer - PHP Developer - PHP Programmer - PHP - MySQL Job Location: CA: Los Angeles Pay Rate: competitive Job Length: full time Start Date: 2011-05-06 Company Name: Cybercoders Contact: Shea Stone Phone: email only Fax: email only Description: Web Developer - PHP Developer - PHP Programmer - PHP - MySQL Web Developer - PHP Developer - PHP Programmer - PHP - MySQL - Javascript - HTML - CSS - Facebook - Skills Required - PHP, PHP4, PHP5, MySQL, Javascript, XHTML, DHTML, HTML5, HTML 5, Flash, actionscript, Facebook, Promotional, Marketing, PHP Developer, PHP Programmer, Web Developer Web Developer - PHP Developer - PHP Programmer - PHP - MySQL - Javascript - HTML - CSS - Facebook API If you are a PHP Programmer or Web Developer with strong skills in PHP Development, please read on! We are an award winning Interactive Agency with offices throughout the world. Were currently looking to add a PHP Developer, with skills in both Front End and Back End development, to our team in Venice, CA. In this role youll be developing Promotional / Marketing web ...

Parsing a php include (which also contains php code)
Hello, I am using the <?php include() ?> statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually parse the include? I've tried this before, and it did not parse the include. Rather, it included the file as just plain ASCII. ======================= /*EXAMPLE 1*/ /*index.php*/ .... <?php include('global/includes/footer.inc') ?> .... /*footer.inc*/ .... <p>&copy 1993-<?php echo date("Y") ?> Kingswood School. All rights reserved.</p> .... /*EXA...

PHP with Indian PHP Developers #3
Dear all, If you want to make a PHP web application, or need to Hire PHP Developer contact a leading PHP Web Development Compnay http://www.virtueinfo.com/php-developers/php-web-development.htm ...

php condition in a tabel with html and php
Hello, I would like to show a line in a tabel in html if there is quantity of article choosed. My code is: <? if ($quantite1 > 0) { echo(' <tr> <td align="left" nowrap="nowrap">Article 1</td> <td align="center"><? echo $quantite1 ?> </td> <td align="center">20 &euro;</td> <td align="center"> <? echo $montant1 ?> &euro;</td> </tr>'); } else{ echo(""); } ?> If there is no article >> no line If there is article >> show the l...

Modify a php file(model) with php
I have an invoice model on my server! and i want to replace some field(like adresse, phone, price, VAT, ....) do you know a tools or class that allows those kind of manipulations Thanks you Yoni Yoni Alhadeff a �crit : > I have an invoice model on my server! and i want to replace some field(like > adresse, phone, price, VAT, ....) > > do you know a tools or class that allows those kind of manipulations > > Thanks you > > Yoni > > Couldn't you replace field with var and have them set when including your template (it become one in fact) ? I didn'...

PHP/XML (or PHP/MySQL) CMS
I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for managing a large corporate website with a lot of different information. I have found some CMS, but they are just not good enough. Can you recommend one ? thanks in advance. Nona Me wrote: > I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for > managing a large corporate website with a lot of different information. > I have found some CMS, but they are just not good enough. > > Can you recommend one ? > > thanks in advance. > > try www.mamboserver.com/ imho top-notch reg. sh -- "The goal of Computer Science is to build something that will last at least until we've finished building it." -- unknown Stefan Hegenbart wrote: >> I have found some CMS, but they are just not good enough. >> >> Can you recommend one ? >> > > try www.mamboserver.com/ > imho top-notch Or if you need something really mighty: www.typo3.org Nona Me wrote: > I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for > managing a large corporate website with a lot of different information. > I have found some CMS, but they are just not good enough. > > Can you recommend one ? > > thanks in advance. > > > From - Thu ezPublish: http://www.ez.no/ ...

PHP on a MacOS sever. Where is php.ini?
I have a client who is using a Mac OSX server. I'm logged in now, but I cannot find php.ini. Is the file called something different on a Mac? I need to locate the variable for max_uploads and increase the size. -- [ Sugapablo ] [ http://www.sugapablo.com <--music ] [ http://www.sugapablo.net <--personal ] [ sugapablo@12jabber.com <--jabber IM ] Sugapablo wrote: > I have a client who is using a Mac OSX server. I'm logged in now, but I > cannot find php.ini. Is the file called something different on a Mac? > > I need to ...

[Apache+PHP] Error building PHP
Hi, I am building php 4.3.10 on slackware 10.1.0 and I got an error. More in details: I've successfully installed apache_1.3.33. In php-4.3.10 directory, I typed # ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --enable-module=so and i got the following error: # ---------------------------------------- Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... Sorry, I was not able to successfully run APXS. Possible reasons: 1. Perl is not installed; 2. Apache was not compiled...

Web resources about - Send array from php to php - comp.lang.php

Array - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

The upcoming HomeKit-compatible Array lock is powered by solar energy
... device compatible with Apples HomeKit smart home protocol. Hampton Products International has unveiled the Brinks Home Security Array smart ...

IDG Contributor Network: NetApp buys SolidFire, Hitachi Data Systems rolls out all-flash array. Coincidence ...
I was somewhere near Everest Base Camp the day the news came out that NetApp was buying Solidfire for close to $1 billion, so it took a few days ...

Ava Duvernay’s Array Acquires Indie Drama ‘Echo Park’
EXCLUSIVE: Romantic indie drama Echo Park had its world premiere at the 2014 Los Angeles Film Festival, and now Ava Duvernay ’s Array has acquired ...

Watch Kris Jenner Try on an Array of Glamorous Dresses for Her 60th Birthday With Kim Kardashian
On the next Keeping Up With the Kardashians, viewers will get a closer look at Kris Jenner's epic 60th birthday bash, and ET has a sneak peek! ...

Nimble Storage Adds Smarts to New All-Flash Arrays
Nimble bought InfoSight for its predictive analysis technology, and now that IP is hard at work in the new all-flash array.

Nimble Predictive All Flash Array With V-NAND
Nimble’s All Flash Array expands upon its prior hybrid HDD and flash products to provide significant performance improvements and considerable ...

We Could Find Even More Gravitational Waves Soon with Pulsar Arrays
It’s only been a couple of weeks since the world cheered for the LIGO collaboration that made the first direct detection of gravitational waves ...

Feds Eye Wide Array of Possible Threats to Super Bowl 50
But the information is neither specific nor new, officials say.

Solar energy rolls out like a carpet with groundbreaking Roll-Array photovoltaics
Read the rest of Solar energy rolls out like a carpet with groundbreaking Roll-Array photovoltaics

Resources last updated: 3/23/2016 6:55:47 PM