Page 1 of 1

"Report Incorrect" implementation in PHP

Posted: Mon Dec 05, 2011 10:38 am
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>


Re: "Report Incorrect" implementation in PHP

Posted: Tue Dec 06, 2011 5:52 am
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

Re: "Report Incorrect" implementation in PHP

Posted: Tue Dec 06, 2011 11:59 am
by Live24x7
Thanks social_experiment

i will try and get back. I am not using sessions though.

Re: "Report Incorrect" implementation in PHP

Posted: Tue Dec 06, 2011 12:34 pm
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