Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-01-2006, 08:59 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
Query strings...

Well I thought I'd post a little helpful snippet of code to all you aspiring PHP developers out there.

I was having trouble when referring to scripts using $_SERVER['QUERY_STRING] and ending up getting the query repeated over and over if i added something to the end of it so i did this:

PHP Code:
$qstring $_SERVER['QUERY_STRING'];
$qstring explode('&op='$qstring);
$qstring $qstring[0]; 
just replace &op= with what you dont want to be there...

Example:
Code:
<a href="?<?=$qstring;?>&op=add">Add</a> :: <a href="?<?=$qstring;?>&op=edit">Edit</a> :: <a href="?<?=$qstring;?>&op=delete">Delete</a></td>
$qstring evals to this when nothing is there
Code:
view=GM&cmd=manage
Have fun,
BeBop
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net.
Free Teamspeak servers: http://gamersnetwork.us/

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DFBHD-TS: Unable to load error strings raiden Tech Support 7 08-21-2007 08:33 PM
Error: UNABLE TO LOAD STRINGS JBmtk Tech Support 3 12-31-2006 07:49 PM
Query Stoint Sigs and Graphics 7 06-13-2005 07:52 PM
Mysql SELECT query. Stu phphq.Net Forums 1 06-01-2005 03:08 PM
Query Optimization BeBop Web design and Programming 5 01-14-2005 06:01 PM


All times are GMT -5. The time now is 12:28 AM.




Powered by vBulletin®