Re: passing variables
От | hodges@xprt.net |
---|---|
Тема | Re: passing variables |
Дата | |
Msg-id | 3E05730F.9099.213652@localhost обсуждение исходный текст |
Ответ на | Re: passing variables (brew@theMode.com) |
Список | pgsql-novice |
I put $func = $_REQUEST('func'); as my second line and got Fatal error: Call to undefined function: array() in /var/www/html/php_lib_login_includes/ test_create_acct.php on line 2 So I searched on $_REQUEST in the PHP manual web page http://www.php.net/manual/en/preface.php and found no entries. Uh is this a joke for newbies? Cheers, Tom On 21 Dec 2002 at 18:41, brew@theMode.com wrote: > > > I have two files below. Why does the first file not pass > > values to the second file? > > I suspect you are using the old style way to pass variables and in later > versions of PHP that has changed. I'm not sure what version, I think it > changed in 7.1, 7.2 for sure. > > You now find the passed variables in the $_REQUEST array, so if you wanted > to load another variable in the script you passed it to:: > > $func = $_REQUEST['func']; > > That could be one problem..... > > brew > > > > Tom > > > > First file > > <HTML><TITLE>Test form</TITLE> > > <body>Test Form<BR> > > <form method="POST" action="test_create_acct.php"> > > <input type="text" name="func" value="strtoupper"><p> > > First Name: <br> > > <input type="text" name="fname"><p> > > <input type="submit" name="submit" value="submit"> > > </body></html> > > > > > > file: test_create_acct.php > > > > <?php > > $res = $func($fname); > > echo "$res"; > > ?> > > > > Fatal error: Call to undefined function: () in > > /var/www/html/php_lib_login_includes/ test_create_acct.php on line 2 > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 3: if posting/reading through Usenet, please send an appropriate > > subscribe-nomail command to majordomo@postgresql.org so that your > > message can get through to the mailing list cleanly > > > > ========================================================================== > Strange Brew (brew@theMode.com) > Check out my Musician's Online Database Exchange (The MODE Pages) > http://www.TheMode.com > ========================================================================== > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >
В списке pgsql-novice по дате отправления: