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?
how can i display php source code snippets ?
I am outputting some pho code .. and I want to display the source code so people can copy and paste it .... not really wanting to use a TEXTAREA box .... any ideas ?
Storing Values taken from a DB...
Using this code it will generate a short list from my database <?phpmysql_connect('localhost','root','');mysql_select_db("clients");$fname = $_POST['firstname'];$SQL = "SELECT *
PHP FTP connect doesn't work with correct login
Hi!i am working on this test code:Quote<?php $ftp_server = "ftp.*******.it";$ftp_user = "weburl@*******.it";$ftp_pass = "CENSORED";// set up a
Firewall / visited websites logger
Hi.
Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rewrite. I recently wrote a custom framewok that is loosely based on Codeigniter. To get SEF URL's 'n
string to currency format
Hi guys...Actually I chunk out some data from txtfile and one of the data contains amount value but in string format like so.."000000010000" -->desire result
Add weeks in a query?
I have a SQL that summarizes the quantity per week. The weeks that has no value does not exist in the table. How can I add these missing weeks with a 0 value in the SQL. Need this to use Avg and
extract a file from zip file
hi,i know how to unzip a zip file in php, but is there a way to just extract a certain file only?
Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what causes it to crash but been testing it for some time and it's my retrictions that won't allow it in.
PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hopefully someone here can help me out. I have checked php.ini and file uploads are on with a limit of