Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Problems with variable
If got a menuscript on a site with variables
The link is :<a href='menu.php?menuid=1>
In menu.php the variabele is read:
if ($menuid=='1') {
echo"<a href='1-1.html' target='output' class=submenu>In het kort</a><BR>";}

This works on my own server : http://dragstra.mweb-design.nl/kc

But not here : http://www.keuzecentrum.nl

Help



Report this thread to moderator Post Follow-up to this message
Old Post
Maurice Schalker
10-14-04 08:56 PM


Re: Problems with variable
*** Maurice Schalker wrote/escribió (Thu, 14 Oct 2004 11:45:15 +0200):
>  If got a menuscript on a site with variables
> The link is :<a href='menu.php?menuid=1>
> In menu.php the variabele is read:
> if ($menuid=='1') {

Replace $menuid with $_GET['menuid'] and find some documentation about the
register_globals option in php.ini


--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--

Report this thread to moderator Post Follow-up to this message
Old Post
Alvaro G Vicario
10-14-04 08:56 PM


Re: Problems with variable
Maurice,

I'm only guessing here, but perhaps you have a solo apostrophe in <a
href='menu.php?menuid=1>
which may be causing your problem?
-Ike


"Maurice Schalker" <info@fotoserver.nl> wrote in message
news:416e4aa2$0$568$e4fe514c@news.xs4all.nl...
> If got a menuscript on a site with variables
> The link is :<a href='menu.php?menuid=1>
> In menu.php the variabele is read:
> if ($menuid=='1') {
> echo"<a href='1-1.html' target='output' class=submenu>In het
kort</a><BR>";}
>
> This works on my own server : http://dragstra.mweb-design.nl/kc
>
> But not here : http://www.keuzecentrum.nl
>
> Help
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ike
10-14-04 08:56 PM


Re: Problems with variable
"Alvaro G Vicario" <alvaro_QUITAR_REMOVE@telecomputeronline.com> wrote in
message news:1u1fz06srecz0$.yz4vud9emyuz.dlg@40tude.net...
> *** Maurice Schalker wrote/escribió (Thu, 14 Oct 2004 11:45:15 +0200): 
>
> Replace $menuid with $_GET['menuid'] and find some documentation about the
> register_globals option in php.ini

Yes, later versions of PHP (4.2.0> ) turn off register globals by default. It
is very dangerous. See here http://uk2.php.net/register_globals
However, I tend to use $_REQUEST['menuid'] as this leaves your scripts
easily portable between get and post methods....

Nathan



Report this thread to moderator Post Follow-up to this message
Old Post
Treefrog
10-14-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:00 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.