Page 1 of 2

Passing Variable on PHP pages

PostPosted: 20. October 2010 20:57
by dr-tbird
Hi,

I have an HTML form that is trying to pass values via PHP to a confirmation page. The page shows the variable names but not the values.

Help?

Dr. TBird

Re: Passing Variable on PHP pages

PostPosted: 20. October 2010 21:13
by Altrea
Sourcecode?

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 10:10
by peterwt
I have just upgraded to the latest XAMPP and came across this problem myself.
If you are using the latest version of XAMPP then the version of php included has register globals set to off. You can change this in the php ini file.

Peter

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 11:14
by Altrea
peterwt wrote:If you are using the latest version of XAMPP then the version of php included has register globals set to off. You can change this in the php ini file.


1st: It is quite uncommon that register_globals are the problem of the poster
2nd: enable register_globals again is NO GOOD solution. register_globals are a HUGE SECURITY ISSUE and register_globals will be completely removed with PHP6

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 14:40
by dr-tbird
I am new to this, how do you fix the php ini? :oops:

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 15:45
by Altrea
Okay, if you don't need some good advices... thats up to you.

How to enable register_globals
- Open your php.ini file (should be in your xampp\php folder)
- Serach for the line "register_globals = Off"
- Change Off to On
- Restart your Apache

Good luck with that

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 16:57
by dr-tbird
Thanks. I did make the change in the ini but it's still not working. Even simple echo commands are not showing at all now.

Security is not an issue for me at this time since this is an experiment for me alone. I do appreciate the warning though.

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 17:00
by Altrea
like i said, register_globals is very common not your problem.
So please disable register_globals again and restart your Apache.

After that we need to take a look at your sourcecode.
I believe that this is a short_open_tags issue, but this is more like a shot in the dark

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 17:20
by dr-tbird
I just uninstalled XAMPP and reinstalled. Now I am getting the error from the index.php that comes with the program saying there is a problem with the install.

I am lost. :(

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 17:29
by Altrea
Well, thats the point i had to give up.
I've tried to help you, but you take no effort to assist the help.

I wish you all the best. Maybe someone else want to help you.

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 17:45
by dr-tbird
I am a complete newbie to this and you're making me feel really stupid. I don't know where to begin to look when you reference these tags. I'm not a programmer and was told this was an easy way to create web pages.

Thanks

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 18:01
by Altrea
If i ask you for your sourcecode thats not to expose you to ridicule. I just want to proof if the problem is really what i guessed.
But i don't ask you more then twice. So i don't know what the problem is. Don't you know what a sourcecode is? You can ask for everything you don't understand. But if you don't talk about it, but take some action to get into more trouble then before, how could somebody help you getting out?

Okay. Back to topic again. If any of the XAMPP components are running (take a green running label in the xampp control panel) or are registered as Windows Service (have a ticked SVC box in the xampp control panel) we had to stop/unregister them.
After that or If this is not the case, delete your whole xampp folder (and the xampp folders of previous installations if needed).
After that restart your Computer and try again with a fresh install

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 18:06
by dr-tbird
I was not near the PC that had the code when you asked and I forgot you had asked. Here's the simple code that's not even working now.

<?php
echo 'This was generated using PHP!';
?>


I will uninstall again since everything else is looking correct and remove all folders and reboot. Hopefully a new install will work, but you can imagine how frustrating this is when you're feeling lost and having trouble finding any documentation that makes sense online.

Thank you.

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 18:17
by Altrea
dr-tbird wrote:but you can imagine how frustrating this is when you're feeling lost and having trouble finding any documentation that makes sense online.

Yeah, i know that it can be really frustrating. But be patient. I try to guide you step by step.
Maybe you should take some minutes to refresh your motivation :D Drinking a cup of coffee have solved so many problems.


dr-tbird wrote:<?php
echo 'This was generated using PHP!';
?>


Your sourcecode looks good. No short_open_tags issue. Since your Apache runs again we try to find out, what the problem is.

Re: Passing Variable on PHP pages

PostPosted: 21. October 2010 18:28
by dr-tbird
Thanks. I am reinstalling now.