"Report Incorrect" implementation in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Live24x7
Forum Contributor
Posts: 194
Joined: Sat Nov 19, 2011 9:32 am

"Report Incorrect" implementation in PHP

Post by Live24x7 »

a page on my website will display name, mobilenumber and email based on certain match criteria. So far, it is able to display it the way i wanted it to.

Now i want to add a last colum to the table for each row with the title "report incorrect mobile number"

So when a user clicks on the "reports incorrect" for a given row in the table, it should send an email to the adminstrator email id with the name, mobile number and email details for that particular row.

How do i get started. Pls help ..I am completely stuck here :roll:

Thanks

the code so far:

Code: Select all


<table border="1"><tr><td>Matched Name</td><td>Contact Number</td><td>E mail</td><td>Report Incorrect</td></tr>
<?php while ($row = mysql_fetch_assoc($match)) // fetches results
{ ?>
<tr>
<td width=200> <?php echo $row['rname'] ?> </td>
<td> <?php echo $row['rmobilen'] ?></td>
<td> <?php echo $row['remail'] ?></td>
<td> <?php echo "report incorrect" ?></td> // this is where i want to include a clickable link which sends an automated email containing details for that particular row to the admin email id.
</tr> 
<?php }?>
</table>

User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: "Report Incorrect" implementation in PHP

Post by social_experiment »

You want the wrong number reported so you can direct to a page with the number passed either in a query string or sessions. (If you are using sessions, i would go with that). On the 'mail' page you get the number (be it from the session variable or $_GET variable) and send it in an email using mail(). Hth
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Live24x7
Forum Contributor
Posts: 194
Joined: Sat Nov 19, 2011 9:32 am

Re: "Report Incorrect" implementation in PHP

Post by Live24x7 »

Thanks social_experiment

i will try and get back. I am not using sessions though.
Live24x7
Forum Contributor
Posts: 194
Joined: Sat Nov 19, 2011 9:32 am

Re: "Report Incorrect" implementation in PHP

Post by Live24x7 »

@social_experiment

thanks. I managed to get through . :)

I am not using session. But i managed to pass the value using $_POST. And got it working.

thanks a LOT
Post Reply