![]() |
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:
|
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
|
If there any way around this? Like by using str_replace?
|
oh ok, well to automatically escape EVERYTHING you surround the string with '' (single quotes) but if you do
PHP Code:
|
Hmm..
|
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); ?> |
use stripslashes()
i.e PHP Code:
|
All times are GMT. The time now is 01:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|