Jump to content

how to display relevent details from php table


Tje

Recommended Posts

I'm trying to display relevant user details when click after user details button.it is css pop up window.i want to know how to catch relevant user when click the button.my primary key is email.

 

 



$connect = mysql_connect("localhost","root","");
if(!$connect){echo("<script>alert('DBMS connection error');</script>>");}
if(!mysql_select_db("biz", $connect)){echo("<script>alert('Unable to find DB');</script>>");}

$result1 = mysql_query("SELECT radio,yname,mail,cpw,tp,city FROM reg WHERE mail='[email protected]'");
$row1 = mysql_fetch_assoc($result1);
mysql_close($connect);


 

 

 

 



<form class="form-signin" role="form">
User Type :Business
Name : <?php echo $row1['yname'] ?>
Email Address :[email protected] 
Password :xxxxxx
Telephone no :0777777777

</form>


 

this is what i did.Now it's display same name(kasun) for every users details.

 

post-170830-0-02947300-1405507920_thumb.jpg

 

please help.

This is admin panel function(manage users).Every registered users names are display in this table.When click this show button it's open pop-up.i want to display all the user details in this pop-up.

 

--this is my php table --





$connect = mysql_connect("localhost","root","");
if(!$connect){echo("<script>alert('DBMS connection error');</script>");}
if(!mysql_select_db("biz", $connect)){echo("<script>alert('Unable to find DB');</script>>");}
echo "test";
$result = mysql_query("SELECT yname FROM reg");

mysql_close($connect);

while($row=mysql_fetch_array($result))
{
echo '<tr class="odd gradeX">
<td>'.$row["yname"].'</td>
<td><input type="image" src="images/view.png" width="40" height="40" name="view" id="view" class="center" data-toggle="modal" value="show" data-target="#signin1"/></td>

</tr>';
}
echo '</table>';




 

 

this is user details pop-up...




$connect = mysql_connect("localhost","root","");
if(!$connect){echo("<script>alert('DBMS connection error');</script>>");}
if(!mysql_select_db("biz", $connect)){echo("<script>alert('Unable to find DB');</script>>");}

$result1 = mysql_query("SELECT radio,yname,mail,cpw,tp,city FROM reg WHERE mail='[email protected]'");
$row1 = mysql_fetch_assoc($result1);
mysql_close($connect);




 



<form id="form1">
User Type :Business
Name :<?php echo $row1['yname'] ?>
Email Address :[email protected]
Password :xxxxxx

</form>


(only name come from DB.others are still hard code).please help

post-170830-0-71786200-1405570344_thumb.jpg

That still doesn't show us much of anything.  The model is triggered by javascript most likely, so we need to see that code and any ajax/php code that goes with it.  If we can't see hwo this is functioning we can't really help you.  All you have provided is the code that builds the image button.

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.