Skip to content

remove script tag from HTML content

I am using HTML Purifier (http://htmlpurifier.org/) I just want to remove tags only. I don’t want to remove inline formatting or any other things. How can I achieve this? One more …

Strip out HTML and Special Characters

I’d like to use any php function or whatever so that i can remove any HTML code and special characters and gives me only alpha-numeric output $des = “Hello world) (*&^%$#@! it’s me: …

Automatically insert Line break?

I’m making a news posting system and I was wondering if it is possible to automatically insert a <br /> tag where ever there is a new line? For example, if posted a news article with the following text in the text area: it would add this to the news database: Is there a way to do this? Answer http…

Contact form 7 post to .asp

Is it possible to post the form contents of Contact Form 7 form fields to an awaiting .asp page? My form has four input fields and one hidden field. Name, Telephone, Email, HowFoundUs, Refer. I want to post those input values to the following .asp page: clientsite.com/default.asp?name=xxxxxx&telephone=xxx…

PHP & MySQL: How can I use “SET @rank=0;” in $query=

In my PHP file, I use this line to pull data from my mySQL database: If I check the SELECT statement in phpMyAdmin’s SQL window (without $query= ) it works fine. But, if I use it in PHP, then I get an error. It doesn’t like the “SET @rank=0;” bit. Is there a way to use “SET @rank…

How to convert video to mp4,webM,ogv while uploading ?

i am using videojs to play video on my website(it’s a HTML5 website) so for a better support i need to make 3 formats of each video mp4,webM,ogv. But in my website user can upload video also. So please tell me how can i automatically convert videos after/while uploading to these formats. I am using PHP5…

Anyone ever used PHP’s (unset) casting?

I just noticed PHP has an type casting to (unset), and I’m wondering what it could possibly be used for. It doesn’t even really unset the variable, it just casts it to NULL, which means that (unset)$anything should be exactly the same as simply writing NULL. Anyone ever used it for anything? I can…

Oracle to_date function with codeigniter

I am using Codeigniter to insert data into an Oracle table which contains a date field. Sample code looks like this: Now the problem is, to insert date fields into Oracle, i need to use the to_date function which is executed in the database. With the above code, the to_date function comes out inside single qu…