Click here to Skip to main content
15,867,323 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok, i am using page url to pass values among pages. I have set pages with urls-
1). threads.php?catagory=catagory1,
2).posts.php?catagory=catagory1(got value from above url using $_GET), &id=6(its primary key id from catagory1 table),&name=topicname(its topicname from a replies table), and
3). reply.php(with above url using get), and i have also many more pages but i think its good to include those pages only where i stuck. Now i want to pass name value from any of the links above (1 or 2) on thread.php page so that i can write query like-
select *from tablename where topicname='$_GET[name]' sothat i can display number of replies on threads.php correspond to there topicname. Is there any way to do it?
Posted

 
Share this answer
 
v2
Comments
Pankaj Mahor 14-Sep-13 5:17am    
Any other solution please?
Dholakiya Ankit 14-Sep-13 5:23am    
yes
Dholakiya Ankit 14-Sep-13 5:24am    
check updated
1) Don't write queries like that! You expose your page to SQLi attacks.
2) You can use cookies and session state as well.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900