PHP - I Think I'll Snap My Keyboard.
Alright I've racked my brain over and over, and to me it seems completely illogical that this isn't fucking working. At this point I'm starting to get angry and I really need someone to explain to me why this doesn't work because I refuse to move on in my studies until I figure this out. I would really appreciate it. note: I didn't post this in regex because it's nothing to do with the regex really.
Everything works just golden except the last if statement. If I enter say "a"" in the facebook form, it will return "a", instead of: "facebook.com/a". I seriously cannot fathom why and need help. I've tried else, elseif, if in varying orders thinking maybe I just lack understanding of them but no. So that's why I have it currently placed idioticly in 3 if statements. Code: (php) [Select] <?php $first_name = trim($_REQUEST['first_name']); $last_name = trim($_REQUEST['last_name']); $email = trim($_REQUEST['email']); $facebook_url = trim($_REQUEST['facebook_url']); $facebook_url_check = false; if (preg_match("/facebook.com\/|facebook.org\/|facebook.net\//", $facebook_url)) { $facebook_url_check = true; } if ($facebook_url_check = true) { $facebook = preg_replace("/facebook.org\/|facebook.net\//i", "facebook.com/", $facebook_url); } if ($facebook_url_check = false) { $url = "facebook.com/"; $facebook = $url . $facebook_url; } ?> Similar TutorialsHello to everyone.
I have a php website, in which i would like to integrade a virtual keyboard in any text boxes I have on it, including in google custom search.
I found in a website a virtual keyboard which is free for integrade in javascript code.
But when I am trying to use it, It appears the text box and the keyboard together.
I would like to know if there is any way to catch and use only the virtual keyboard in the existing text boxes in my page, I would like to take only the keyboard from the set of these both text box and keyboard and use it in my site.
I don't know if I am being understandable, if no please tell me.
Thanks in advance.
The keyboard, is from the website: http://www.greywyver...script/keyboard
Thank you very much !!!
|