Jump to content

Need PHP Help extract mail from a link


butchhh

Recommended Posts

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

$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 exploits

e.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]


regards
Liam
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

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.