PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<a href="upload.php?image_postion='.$_GET["image_position"].'&type=list&page="1"&id='.$_GET["id"].'&url='.$_GET["url"] if ($_GET["image_id_1"]!="") { echo '&image_id_1='$_GET["image_id_1"];} if ($_GET["image_id_2"]!="") { echo '&image_id_2='$_GET["image_id_2"];} if ($_GET["image_id_3"]!="") { echo '&image_id_3='$_GET["image_id_3"];}'"><< First</a> | ';
I get "Parse error: syntax error, unexpected T_IF" and i'm stuck at work without my php book and just can't figure it out
What have i done wrong and how do i fix it
Cheers
Kev
My head is spinning after looking at the code! I fail to see any propoer syntax or logic.
You need to separate your conditional (if) statements from your echo function. Carry out the conditional checks first,define variables and then in echo you join the variable with strings.
basically i want the url to have image_id_1,2 or 3 display if it has been passed from the previous page
It might not be right, i had to do a quick fix for the client, bloody last min changes
I have it working here:-
Ok i think i'm gonna go down a different route with this now.
and i just want to bounce the my method around out there to see if i'm going down the right road.
The problem is that i use 1 image list page for three different pages, ie news_update, weblink_update and on each page are three different images.
As you can see previously i tried to keep information by passing it in the url.
So i thought about sessions and storing the info in a session as i go.
So my question is would that be a good way of doing it
Cheers
Kevin