Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and it's all down to darn slashes.
The brand in question is O'Brien
Code: [Select]<div><a href="javascript:void(0)"onclick="window.open('/admin/popup/shop.php?tbl=brands&brand=<? echo addslashes($row["brand"]); ?>&brandId=<? echo $row["brandId"]; ?>&action=edit&step=1', 'none', 'width=750,height=250,menubar=no,status=no,resizable=no,location=no,toolbar=no,scrollbars=yes,left=50,top=50,titlebar=no')">EDIT</a></div>
The addslashes is giving me the result O\'Brien - 3 slashes, not 2!
Therefore when we are preparing to use a form to input it back into the database:
Code: [Select]<input name="brand" type="text" value="<? echo mysql_real_escape_string(urldecode(stripslashes($_GET["brand"]))); ?>" />
It's being entered as O'Brien - still with a slash, instead of O'Brien...
Any ideas?
Problem writing URL into database
How would I write this into the database?<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>I tried this:Code: $url =
Preg_match with an array
is there an away to use preg_match with an array?i want to check a string with an array to see if it contains badwords however i get an error saying string expect it got an array, which i know.
WM transfer order: confirm different batch than proposed by system
Hi folks,
RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mail is sent correctly, but the formatting of the content includes rtf formatting like:
Can't find a decent web analytics!!!
I've downloaded and installed Piwik. It's location detection based on IP addresses is fairly inaccurate even after installing the recommended plugins. Can someone please suggest a free solution with
Am i doing this wrong?
Im pulling from an Oracle database some info... one of which is a field count_pnums which is a NUMBER type field.Code: <?php$sql_E = "SELECT count_pnums, dist_pnums FROM
Validating time
Hi Guyswhat do you think of the following approach to validate a 24hour time:http://snipplr.com/view/23007/validate-time/Are there any better approaches ?
RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to also post other articles that don't have a feed. Is there a legal/respectable way to harvest and post
DOMDocument
Hello All,I need to take an XML document, modify some of the nodes in it and then perform a selective reordering of a subset of nodes. The modification I have done without too much difficulty -
Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y int 3' in an easy way with maybe a for loop or something?I want the data entered to be like this:0x