I have a website and i want 2 give my users a way 2 see other users e-mail but the problem is that i have more infos there than the user all i want is the e-mail for example i need a box where u type an user, and that box will ad that user name 2 a link like: https://www.mywebsote.com/dfdsfd6565userid=USERHERE and after the loading of that page r some infos but what i need is 2 extract just the e-mail from that loaded page.
Ill reappy apreciate if someone can help me
I need some help 2 extract an email from a page
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I read your post like 3 times and it still makes no sense
There's like one full-stop (period) in that whole post 
You want to allow users to view others users email addresses (presumably agreed by the users!). Where does extracting an email address from a page come into it? What code have you tried so far? Maybe that would help to clear up the confusion as to what you're aiming to do.
You want to allow users to view others users email addresses (presumably agreed by the users!). Where does extracting an email address from a page come into it? What code have you tried so far? Maybe that would help to clear up the confusion as to what you're aiming to do.
i have a link(this link must be hidden from users) with infos about the users like e-mail address, home address, phone etc and i need some kind of php that will extract from the link just the e-mail address...and i was thinking about a form with a box where i enter the userid and the script will extract just the e-mail adress and shows it to you. the link its something like this https://www.mysite.com/userid=JhonDoe and here ull see all info about jhon doe but i need that script 2 extract the e-mail address af the userid u enter in that form box.
in other words i enter a string in the form and the script connects 2 the link and extratcs only the e-mail .
sry for my bad english im really stressed hope this will help more ill update if u need more info thank you
in other words i enter a string in the form and the script connects 2 the link and extratcs only the e-mail .
sry for my bad english im really stressed hope this will help more ill update if u need more info thank you
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Do you have the email address stored in any kind of database? If not, and you do actually intend to just lift it off a random page, you will probably need some sort of regexp. Although this is long-winded and it would probably be better in the long-run if you put your users data into a database of some sort.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
the info comes from a database that i dont have access, i have just link access thats the problem i got this script for the variable userid
hope this helps
Code: Select all
$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'];