RE: [PHP] Uppdating a frame from another frame using PHP
What about something like this javascript: parent.basket_right.location=page You can encapsulate it in a function like this: function refresh_frame(page,frame_name) { parent.frame_name.location=page; } Then you could call this from an onload in the appropriate body tag of the appropriate frame. So, if frame foo should be updated everytime frame bar is updated, you would make the body tag of frame bar look something like this (don't forget to add the function to your page head): That might help. I am no Javascript guru, so I can't guarantee that everything is correct, but I think this should work. Good Luck, Best, Ryan -Original Message- From: Rickard Walder [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 6:34 AM To: [EMAIL PROTECTED] Subject: [PHP] Uppdating a frame from another frame using PHP I am using PHP on site using frames. I need to uppdate a frame called basket_right everytime I run a file called cart_add.php (which contains no HTML code) from the frame called menu_and_main I tried using the header("Location: ") command, but don't know how to adress the basket_right frame. Is this the right command to use? Does anyone have suggestions? Thanks in advance. /Rickard I include my frameset if this could be of any help: I have replaced some information with *** and ... for easier wieving. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Passing an array as an argument.
try: function process_members($asker_rank, $total_members, $email=array()) { global $database_mysql; mysql_select_db($database_mysql); while (list ($key, $val) = each ($email)) { echo "$key => $val"; } } process_members($asker_rank, $total_members, $email); Your original function declaration only has two variables passed to it. You are passing three variables when you call the function. What's happening is this: function process_members($asker_rank, $email) { global $database_mysql; mysql_select_db($database_mysql); while (list ($key, $val) = each ($email)) { echo "$key => $val"; } } process_members($asker_rank, $total_members, $email); step one: php sets $asker_rank (in function declaration) equal to $asker_rank step two: php sets $email (in function declaration) equal to $total_members step three: php ignores $email array passed to process_members() step four: php passes $email to each(). $email is set to the value of $total_members, which is not an array, and chokes. Using : function process_members($asker_rank, $total_members, $email=array()) { ... } allows you to have a default value for $email. So you can either pass it or not. -Original Message- From: April [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 06, 2001 12:18 PM To: PHP General Subject: [PHP] Passing an array as an argument. How do you pass an array as an argument to a function? My code (or at least the important parts): function process_members($asker_rank, $email) { global $database_mysql; mysql_select_db($database_mysql); while (list ($key, $val) = each ($email)) { echo "$key => $val"; } } # This will display fine. # while (list ($key, $val) = each ($email)) { echo "$key => $val"; } # Doing the same thing with the function here returns this error, though. // Warning: Variable passed to each() is not an array or object in lib.inc on line 447 process_members($asker_rank, $total_members, $email); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: [PHP-DB] PHP, MySQL and XML
http://freshmeat.net/projects/exist/ -Original Message- From: Thor M. Steindorsson [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 5:57 PM To: php-general; php-db Subject: [PHP-DB] PHP, MySQL and XML Does anyone have a solution for importing data from a RDF-XML file into a MySQL database? I've been racking my brain, as well as looking at tutorials and some xml parsers, but if someone has something like this it would save me tons of time. Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]