Unique PHP page need lots of help

igames

New Member
Messages
34
Reaction score
0
Points
0
OK so as the title say i need help with a unique php page. I need it for a private messaging system so when you click on the subject it will go to something like www.example.com/messages.php?id=1

and help will be greatly appreciated! maybe even rewarded!:lol:
 

Shadow121

Member
Messages
901
Reaction score
0
Points
16
I'd do ?page=viewpm&id=1

where page = seperate switch for the different pages such as compose, read and ID is the PM ID ;)

If you dont understand this tell me and Ill help ;) This is my PM system ^^
http://pastebin.com/mb1a2b14
 
Last edited:

Scoochi2

New Member
Messages
185
Reaction score
0
Points
0
when you click on the subject it will go to something like www.example.com/messages.php?id=1

so link to www.example.com/messages.php?id=1 ...
The PHP page called will then set your GET global variable.

So in Shadow121's example (www.example.com/messages.php?page=viewpm&id=1), the variable $_GET['page'] will be equal to 'viewpm' and $_GET['id'] will be equal to 1.

You can use as many as you wish, separate them with ampersands. But if you want to be W3C compliant with your hyperlinks, use $amp; instead of &. Example follows.
?page=viewpm&id=1
 
Last edited:

Shadow121

Member
Messages
901
Reaction score
0
Points
16
But in my script I have it set up for SEO with Mod Rewrite to keep the site all XHTML Valid ;)

EDIT:
Scoochi2 check your PMS ;)

EDIT2
Any get/posts you do you MUST secure them or your site could be vulnerable to hackers.
 
Last edited:

igames

New Member
Messages
34
Reaction score
0
Points
0
Thanks everyone for their replies! It has been working very well so far!
 

balaji2u

New Member
Messages
410
Reaction score
2
Points
0
igames asked for a private messaging system why don't we offer some input interface to the user and use the post method.this makes sense only if security is needed and also we have to sacrifice bookmarking feature and seo..
sorry if im taking this issue in a different way.
just to remind you if security matters for you..
 

Shadow121

Member
Messages
901
Reaction score
0
Points
16
Security should always come first. You wouldn't want your site getting hacked by some noob script kiddie. for the SEO, If you want your site bookmarked by google, use it. If not, its not hard to edit. I'm just saying that it'll make the site neater, and also allow you to keep XHTML/HTML Valid status.
 
Last edited:
Top