SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Jul 13, 2003, 02:04 #1
- Join Date
- Mar 2003
- Location
- Sweden
- Posts
- 370
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How to use $_GET in the right way?
Hello,
I have 1 page to both, Add, remove and edit posts in a table. Now I have this:
PHP Code:if ($_GET['action'] = 'write') {
Show the add post form.
}
PHP Code:if ($_GET['action'] = 'edit') {
Show the edit post form.
}
BUT! When I clik on the thefile.php?action=edit link then the code that is in the if ($_GET['action'] = 'write') { } is shown!?
I have to do something wrong. =(
Martin Lundberg
Sweden
-
Jul 13, 2003, 02:07 #2
- Join Date
- Jun 2001
- Location
- Adelaide, Australia
- Posts
- 6,441
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You'll need to use the comparison operator which is == rather than =
-
Jul 13, 2003, 02:12 #3
- Join Date
- Mar 2003
- Location
- Sweden
- Posts
- 370
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ah stupid me, i knew that =P Thanks, everything works now!
Martin Lundberg
Sweden
Bookmarks