Jump to content

thePhpLady

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by thePhpLady

  1. Just to complicate my life! It works now, thank you.
  2. the content of title is : Butterfly dress the content of imageurl is : http://www.styleandcurves.co.uk/sites/default/files/lb_dress.html Great Plains Butterfly Dress £10 What I want to do is click on Butterfly Dress and be redirected on b_dress.html. Thanks for your help.
  3. How can I show the text in 'title' with a link to 'imagurl'. Can I do that from the database?
  4. I have changed the code, I understand the mistake. Now I can echo the text but it has no link. while($row = mysql_fetch_array( $result )) { $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; echo preg_replace ($reg_exUrl,$row['title'], $row['imageurl']);
  5. Hi there! I need to echo some text from a database table, this text should be linked to a url stored in the same database. I am trying to do this with preg_replace but I am terrible at it! I keep getting this error: Warning: Wrong parameter count for preg_replace() while($row = mysql_fetch_array( $result )) { $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; echo preg_replace ($reg_exUrl, $row['title'); Any suggestion? Thanks
  6. Thank you, I will use it! And...as you say, usually it is not enough to protect from SQL injections! Thanks again
  7. Hi there, Try to add this: if (isset($_POST['action'])) { This should set the variable. Hope it helps
  8. Hi everyone! I have a question that might sound silly... I have stored in my database a url to a pic and some other data. I am unsure if when I retreive data from my database I need some sort of protection. I usually sanitize and prevent SQl injections when I code forms but I am not sure if I have to do the same when I get data from the database. Thanks for your help. Veronica
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.