I want to display link on the page. i am fetching the data(URL) from database,actually before that i am checking if it is URL or not. if it is URL, let take an example google.com so it should take me directly on the Google's page after clicking on that link .
but now the problem is the path is something like this.
Quote mydomain/myfolder/mysubfolder/google.com
i want directly
Quote google.com
Here is my code
Code: [Select]if($row['which_mail'] == "decline")
{
if(!preg_match("/^[a-zA-Z]+[://]+[A-Za-z0-9-_]+\.+[A-Za-z0-9./%&=?-_]+$/i",$row['content']))
{
$ab = $row['content'];
echo $ab ;
// echo "<b>Last message for decline mail is</b>-".<a href='$ab'>".$row['content']."</a>.";
echo "<a href='$ab'>".$row['content']."</a>";
}else{
$decline =$row['content'];
echo "<b>Last message for decline mail is</b>- $decline";
}}
Can anyone look into my code and tell me how can i achieve that?
Thanks in advance.
text box alphanumeric caracters only
hi all! I have search on google on how to enter in a test box only caracters A-Z,a-z,0-9 using php, but all the solutions are not for me I need, if you can help me to allow a user to insert only those
array_diff weirdness
I'm using the following bit of code$diff = array_diff($pids, $pidlist); $diff = array_values($diff); //reindex array to remove empties//output to $discrepancyprint_r($diff);exit;Both $pids and
Reg Ex
Im trying to search for the string: srv_9 (Dead ???)I thought to use preg_match, however I dont know much about reg ex. Can anyone help? Thankks
isset undefined variable
Hi all,Hope someone can point out the obvious. I've a log in script, if you dont enter a username or pw, you get a red asterix show by the field and a pop up.If you enter an email but not the pw, it
Help with file_get_html
The following code gives the expected results:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoyingCode: <?php echo '<li class="newproducts"><a
need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working can someone please help me and show me what I have wrong so I can fix it heres the html form I left
Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and works fine EXCEPT I want to add the strip slashes bit to it so it will save what I type in. However,
Server side $_SESSION
how does one keep the session completely server side. no cookies to the browser at all. i need this site to be cookie and jscript free.
php mail form text wont appear / javascript included
Guys/gals...I am running into a problem whereby I have a great piece of javascript code that mimicks multi-page forms (see www.mtsgroup.co.uk/multiPageForm.htm).....The problem is the php file wont