Fatal error: Cannot create references to/from string offsets

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
james_madrid
Forum Newbie
Posts: 1
Joined: Mon Nov 29, 2004 10:10 pm

Fatal error: Cannot create references to/from string offsets

Post by james_madrid »

hello there, im beginner in php programming.

when i run this script the error appear is "Fatal error: Cannot create references to/from string offsets nor overloaded objects in core24.php on line 296.


what is the possible solution for this script?


function save_orderinfo(&$frm) {
global $USER;

$order = new Object();
$order->customer = $frm["customer"];
$order->email = $frm["email"]; //MADE ADDITIONAL BY JDJ
$order->contact = $frm["contact"];
$order->cellno = $frm["cellno"];
$order->address = $frm["address"];
$order->city = $frm["city"];
$USER["orderinfo"] = &$order;
}
User avatar
harsha
Forum Contributor
Posts: 103
Joined: Thu Jul 11, 2002 1:35 am
Location: Bengaluru (Bangalore) > Karnataka > India

Post by harsha »

the indexing $frm["blah blah"] is not correct

dump $frm using print_r($frm);

and see what is the indexing

example:

frm(
0 => "some string",
1 => "another"
)

might be like this try out :-)
Post Reply