replace sessions
| From: | Ethan Nelson | Date: | Tue, 15 Apr 2003 19:28:50 +0000 |
| Subject: | replace sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144009@lists.php.net to get a copy of this message | ||
Hello fellow PHP'ers. Here is my situation.
I'm trying to prepare a content posted by a form for insertion into our database. The two
problems I am having is that POST is performing two actions on this content that end up messing it
up for later when I pull it out of the database and display it on a webpage.
1) Magic quotes are turned on so all single quotes get transformed into two single quotes. Not a
big problem, but it conceivably could complicate number 2 which is my real problem.
2) Sessions are being used in the application so that means that the content pieces I submit to this
execution page have sessionid's appended to all their links. That's bad.
Is there a patter replace or something that could go through a body of text and isolate just the http://xxx.xxxxx.xxx/?stuff=xxx&SESSIONID=xxxx
pieces out of things like <a href=> and remove just the SESSIONID? I already have a function
that seems like it should be able to remove an argument from a URL. I still need something that
will find the URL's in the body of content so that I can drop the SESSIONID after it has been
posted. Pretty much, I want to undo what sessions do such a good job of doing.
Thanks for all you're help,
-Ethan Nelson, Modulus, LLC