butchhh Posted September 3, 2006 Share Posted September 3, 2006 I need some help with PHP on my website. I have a website and i need to make a box when someone place a username in a box will get the e-mail of that user from a link, the user entered in the box will be added at the end of a link ex: http://www.mywebsite.com/6969&userid=USERHERE this will load a page with some infos, and i dont know how to make to extract just the email address without seeing other infos or that webpage.Ill really apreciate this thank you Link to comment https://forums.phpfreaks.com/topic/19577-need-php-help-extract-mail-from-a-link/ Share on other sites More sharing options...
shocker-z Posted September 3, 2006 Share Posted September 3, 2006 $id=mysql_real_escape_string($_GET['userid']);that will set the variable $id to USERHERE in the url and also strip the url of some potentially dangerous exploitse.g.[code]$id=mysql_real_escape_string($_GET['userid']);$query=mysql_query("SELECT * FROM table_name WHERE id = '$id'") or die (mysql_error());$row=mysql_fetch_array($query);echo $row['email'];[/code]regardsLiam Link to comment https://forums.phpfreaks.com/topic/19577-need-php-help-extract-mail-from-a-link/#findComment-85178 Share on other sites More sharing options...
butchhh Posted September 4, 2006 Author Share Posted September 4, 2006 i dont have a database but now i dont need 2 extract the email anymore i'm using the iframe in php like <iframe src="http://www.mysite.com/userid=USERHERE" width="100%" height="100%"> now all i need is a box where u enter the user and will place it at the end of the link USERHERE and load with the page in the iframe with php so the users cant see the link...regards Link to comment https://forums.phpfreaks.com/topic/19577-need-php-help-extract-mail-from-a-link/#findComment-85833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.