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='SSS@SSS.SS'");
$row1 = mysql_fetch_assoc($result1);
mysql_close($connect);


 

 

 

 



<form class="form-signin" role="form">
User Type :Business
Name : <?php echo $row1['yname'] ?>
Email Address :abc@gmail.com 
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.

Edited by Tje
Link to comment
Share on other sites

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='SSS@SSS.SS'");
$row1 = mysql_fetch_assoc($result1);
mysql_close($connect);




 



<form id="form1">
User Type :Business
Name :<?php echo $row1['yname'] ?>
Email Address :abc@gmail.com
Password :xxxxxx

</form>


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

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

Edited by Tje
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.