tags:

views:

44

answers:

1

Here is the input form code

<tr valign="top"> 
<td align="right" class="innertablestyle"><font class="normal"><strong>Homepage</strong></font></td> 
<td>&nbsp;</td> 
<td><font class='normal'>http:// 
<input name="website" type="text" id="website" value="<?php echo $website; ?>"> 
&nbsp; </font><font class="normal">&nbsp; </font></td> 
</tr>

Here is the display code

<tr > 
<td height="25" class="selllink"> Website 
Address<font class="h2">&nbsp;&nbsp;&nbsp; 

<?php 
$group_set=mysql_fetch_array(mysql_query("select * from b2b_groups where sb_memtype=".$mem["sb_memtype"])); 
if(($sbrow_off["sb_website"]<>"")&&($group_set["sb_posturl"]=='yes')) 
{echo "<a href='http://".$sbrow_off["sb_website"]."' target='_blank'>".$sbrow_off["sb_website"]."</a>"; } 
else 
{echo $config["sb_null_char"];} 
?> 
</font></td> 
</tr>

form that collects url of users to store in a database. They should not enter the http:// with their URL however many and the result is that when their url is displayed it looks like this

http;//http://www.foo.com I need the form to strip it or ignore it or what ever you think is the best way to handle it.

+2  A: 
if (stripos($website, "http://") === 0) 
    $website = substr($website, 7);
Matt Bridges