Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > global variable does not exist anymore?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th March 01:01
patrikh
External User
 
Posts: 1
Default global variable does not exist anymore?



Dear my friends...

I create a very simple script in html and php as a first step. I use suse, apache2, mysql and php.

I wonder why this script does not work:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Guru - Virtual bookstore who understands you for those want to be a GURU</title>


</head>
<body>

Help us for statistic data collection for increasing our service by 'filling our guestbook'.<br>
<form action="cgi/cgibukutamu.php" method="post">
<table>
<tr><td align="right">Name: </td><td align="left"><input type="text" name="tfnama"></td></tr>
<tr><td align="right">Location: </td><td align="left"><input type="text" name="tflokasi"></td></tr>
<tr><td align="right">E-Mail: </td><td align="left"><input type="text" name="tfemail"></td></tr>
<tr><td align="right">URL: </td><td align="left"><input type="text" name="tfurl"></td></tr>
<tr><td align="right">Comments: </td><td align="left"><input type="text" name="tfkomentar"></td></tr>
<tr><td align="right"><input type="submit"></td><td align="left"><input type="reset"></td></tr>
</table>
</form>

</body>
</html>

The value of "tfnama" is empty.
cgi/cgibukutamu.php
<html>
<table>
<tr><td></td><td></td></tr>
<tr><td align="right">Name</td><td align="left"><?php echo "$tfnama" ?></td></tr>
</table>
</html>

I had a look the into the "/etc/apache2" but I didn't find any "global_variable" switch as I used to find in httpd.conf
"
suseonthelap:/etc/apache2 # grep -n -r "global_variable" ./*
suseonthelap:/etc/apache2 #
"

I got used to find "global_variable=on" line in the httpd.conf.

What should I do now? Please tell me.
--
Patrik Hasibuan <patrikh@penguin-teknologi.com>
Junior Programmer
  Reply With Quote


  sponsored links


2 25th March 01:01
rich
External User
 
Posts: 1
Default global variable does not exist anymore?



Hi Patrik,

Try looking in php.ini

Then leave it disabled, and code your script properly so it checks the
user input and validates it before using it.

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"
  Reply With Quote
3 25th March 01:01
patrikh
External User
 
Posts: 1
Default global variable does not exist anymore?


Hi Richard,

You solved my problem.

Thank you very...very much.
===
On Wed, 25 Jul 2007 23:54:37 +0100


Patrik Hasibuan <patrikh@penguin-teknologi.com>
Junior Programmer
  Reply With Quote
4 25th March 07:37
ceo
External User
 
Posts: 1
Default global variable does not exist anymore?


It's register_globals, and you should fix this ancient script to not
rely on register_globals being "on"


--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
  Reply With Quote
5 26th March 07:23
patrikh
External User
 
Posts: 1
Default global variable does not exist anymore?


OK, Thanks Richards.
===
On Wed, 25 Jul 2007 23:54:37 +0100


Patrik Hasibuan <patrikh@penguin-teknologi.com>
Junior Programmer
  Reply With Quote
6 26th March 07:23
patrikh
External User
 
Posts: 1
Default global variable does not exist anymore?


Thank you very much.
===
On Fri, 27 Jul 2007 00:26:24 -0500 (CDT)

Patrik Hasibuan <patrikh@penguin-teknologi.com>
Junior Programmer
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666