• 2 Questions: PHP - why do my ' turn to \' AND firefox - dotted boxes around selection
    22 replies, posted
  • First of all, my in progress site (all by hand, no pre-written code, just the occasional modified tutorial code used) is here: [url]http://jallenbah.co.uk[/url] Now, first problem - ugly boxes in firefox when clicking link divs, doesn't happen in chrome. [img]http://dl.dropbox.com/u/5062494/forumpost/firefoxboxesbad.png[/img] How can I stop this, or can't I? Now, problem 2, slashes in my emails. Here's the message I'm sending from [url]http://jallenbah.co.uk/contact.php[/url] (please don't abuse this, I'm trusting you) [code]There's strange slashes in my message! "what is this i dont even" fffffffffffffffffffff ffffffffffffffffff fffffffffffffffffffffffff fffffffffffff[/code] Here's how it ends up in my email inbox - \ before every " or ' [code]/////////////////////////////////////////////////////// //- Jallenbah.co.uk -\\ ------------------------------------------------------ From: James Allen - someemail@somewhere.lol Subject: Why are there stooopid slashes in my message :( ------------------------------------------------------ There\'s strange slashes in my message! \"what is this i dont even\" fffffffffffffffffffff ffffffffffffffffff fffffffffffffffffffffffff fffffffffffff ///////////////////////////////////////////////////////[/code] Here's my mail code... [code]$name_field = $_POST['name']; $email_field = $_POST['email']; $subject_field = $_POST['subject']; $message_field = $_POST['message']; $to = "<my email>"; $from = "From: Jallenbah.co.uk <my email>"; $subject = "Jallenbah.co.uk || " . $name_field . " - " . $subject_field; $body = "/////////////////////////////////////////////////////// //- Jallenbah.co.uk -\\\\ ------------------------------------------------------ From: $name_field - $email_field Subject: $subject_field ------------------------------------------------------ $message_field ///////////////////////////////////////////////////////"; mail($to, $subject, $body, $from);[/code] All other feedback is of course welcome, and if there's a security flaw you notice, please inform me of that too! Thanks.
  • [QUOTE=Jallen;22536681]Ok, how do I stop it?[/QUOTE] It looks like PHP has Magic Quotes enabled. You can try disabling it by reading [url=http://www.php.net/manual/en/security.magicquotes.disabling.php]this article[/url] in PHP's documentation. If you want to leave that enabled for whatever reason, you can try using something like this, [php]$message_field = stripslashes($_POST['message']);[/php]
  • My PHP install is fucked. Even with magic_quotes (runtime & gpc) disabled, it still does it :/
  • [QUOTE=Torekk;22538567]Second thing, just use this: [code]outline: none;[/code][/QUOTE] This worked great, thanks. [editline]11:03AM[/editline] [QUOTE=Fizzadar;22544236]My PHP install is fucked. Even with magic_quotes (runtime & gpc) disabled, it still does it :/[/QUOTE] I solved the problem by doing [code]$message_field = stripslashes($message_field);[/code] It keeps slashes but makes \" turn to " etc. Basically fixes the problem.
  • sorry but your website looks pretty bad. The color scheme isn't that nice and the whole lines thing looks weird.
  • [QUOTE=:awesome:;22551765]sorry but your website looks pretty bad. The color scheme isn't that nice and the whole lines thing looks weird.[/QUOTE] I disagree, I like the style, especially the colours. If you are viewing it in internet explorer then it will look like shit btw. Also, your website has a [B]742KB background[/B] ripped from some guys deviantart page. Uh...
  • [php] if (get_magic_quotes_gpc()) foreach($_POST as $k => $v) $_POST[$k] = stripslashes($v); [/php] This is what I used back when I was still using PHP. Repeat for $_GET if necessary.
  • [QUOTE=Jallen;22551884]Also, your website has a [B]742KB background[/B] ripped from some guys deviantart page. Uh...[/QUOTE] It's 2010, get over it. Large backgrounds are sexy. [url=http://vladh.net/img/bg.jpg]vladh.net[/url] [url=http://envato.com/wp-content/themes/envato/images/background.jpg]envato.com[/url] [url=http://static.anyhub.net/hills.png]anyhub.net[/url] [url=http://charliesomerville.com/bg.jpg]charliesomerville.com[/url]
  • Guys, when I try to go here (bluehost thread): [url]http://www.facepunch.com/showthread.php?t=951526[/url] I get this: [img]http://dl.dropbox.com/u/5062494/forumpost/wth_avg_fp.png[/img] Anyone else getting something similar?...
  • [QUOTE=Jallen;22554231]Guys, when I try to go here (bluehost thread): [url]http://www.facepunch.com/showthread.php?t=951526[/url] Anyone else getting something similar?...[/QUOTE] Probably because he posted the source code that was in his files.
  • [QUOTE=Jallen;22554231]Anyone else getting something similar?...[/QUOTE] AVG sucks, MSE ftw
  • [QUOTE=Jallen;22551884]I disagree, I like the style, especially the colours.[/QUOTE] You do. I don't.
  • [QUOTE=:awesome:;22551765]sorry but your website looks pretty bad. The color scheme isn't that nice and the whole lines thing looks weird.[/QUOTE] It's not the best website ever but it's definitely not the worst.
  • [QUOTE=jaybuz;22599492]It's not the best website ever but it's definitely not the worst.[/QUOTE] thats true.
  • [url]http://jallenbah.co.uk/[/url] Built it up a little, changed the title + bg since it looked a little boxy and simple. Thoughts? Wait shit broke it Ok fixed Who did this >:O [code]/////////////////////////////////////////////////////// //- Jallenbah.co.uk -\\ ------------------------------------------------------ From: a - a Subject: a ------------------------------------------------------ a ///////////////////////////////////////////////////////[/code]
  • I would suggest making the lines a lot less opaque, and the red and yellow a little less clashing with your background. That should make it a lot better.
  • [QUOTE=turb__;22554037]It's 2010, get over it. Large backgrounds are sexy. [url=http://vladh.net/img/bg.jpg]vladh.net[/url] [url=http://envato.com/wp-content/themes/envato/images/background.jpg]envato.com[/url] [url=http://static.anyhub.net/hills.png]anyhub.net[/url] [url=http://charliesomerville.com/bg.jpg]charliesomerville.com[/url][/QUOTE] Thanks, but Jallen is still right because [noparse]:awesome:[/noparse] uh...well...sucks, I guess. I can't really think of anything more relevant to say about him.
  • You might also want to increase the z-index of the No Javascript message. Unless the effect now is the desired effect.
  • [QUOTE=deadeye536;22662487]You might also want to increase the z-index of the No Javascript message. Unless the effect now is the desired effect.[/QUOTE] Oh snap, completely didn't realise that. That's due to my relative placing of my new title I guess. Thanks, I'll add that to my mental todo list.