The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Um.. Apostrophes and PHP..
Um.. Apostrophes and PHP..
I use ashnews and recently in my new host when I submit something with an apostrophe it gives me a mysql connect error, but when I put a \ in front it goes through.. ex Quote:
Quote:
|
#2
|
||||
|
||||
i dont know what the question was, but if you do an apostrophe or a quote you have to escape it with a \ before it
|
#3
|
|||
|
|||
If there any way around this? Like by using str_replace?
|
#4
|
||||
|
||||
oh ok, well to automatically escape EVERYTHING you surround the string with '' (single quotes) but if you do
PHP Code:
|
#5
|
|||
|
|||
Hmm..
|
#6
|
|||
|
|||
Everytime I submitted something with an apostrophe, i'd get a mysql cannot connect error. A friend of mine told me how to fix it..
<?php $textarea = addslashes($textarea); ?> |
#7
|
|||
|
|||
use stripslashes()
i.e PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|