Jump to content

*SOLVED* str_replace help needed


marcus

Recommended Posts

[code]
<?php
include("mysql.php");
include("header.php");
$by = $_POST[by];
if(!$by){
$by = id;
};
echo "<table border=0 cellspacing=1 cellpadding=0>
<tr><td>Username<td>Email<td>Website<td>Mail";
$q = "SELECT * FROM `users` ORDER BY $by";
$query = mysql_query($q);
while($user = mysql_fetch_assoc($query)){
str_replace("http://","",$user[website]);
echo "
<tr><td>$user[username]<td><a href='mailto:".$user[email]."'>$user[email]</a><td><a href='http://".$user[website]."' target='_blank'>Site</a><td><a href='mailbox.php?action=write&id=".$user[id]."'>Mail</a>";
};
mysql_free_result($query);
echo "</table>";
include("footer.php");
?>
[/code]

i'm trying to replace http:// in user's defined website address
Link to comment
https://forums.phpfreaks.com/topic/27256-solved-str_replace-help-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.