Hi i have created an static table having from,subject,date etc and i am just able to display
i have created inbox in the front end how to link.....these table to inbox...i have this code but what is this fuction getdata.....how to proceed just help me pls......

<?
function getdata($tble,$field,$whr) {
       $q="SELECT $field FROM $tble where $whr";
       $res=mysql_query($q);
       $r=mysql_fetch_array($res);
       return $r[0];
       }
     $msgcount=getdata("messages","count(*)","status=0");?>
     <a href="inbox.php?read" >inbox(<?=$msgcount; ?>)</a>

hi ishlux,
we use functions to prevent sql injections. place all functions in one page like functions.php
and include that in every php file then you can call that functions and
i didn't understand what u want to do. do u want to retrieve data from database in front end or u want to insert into database

hi

i want to retrieve from database......as soon as i click on inbox it should display all the contents like from, subject, date and if i click on subject it should show the contents pls help me.....................................as soon as possible ......

Hi,

first extract all the mails for a user from table. and display them in a table.

then when you click on a subject, you can use different ways to show the message.

1. you can redirect user to another page with the mailid, and in that page you can retrieve all the information from database using that mail id.

2. you can use invisible divs in the same page and when you click on a message, you can display the div with the message.

3. you can use AJAX to get values.

This article has been dead for over six months. Start a new discussion instead.