Jump to content

Archived

This topic is now archived and is closed to further replies.

ADL77

Dreamweaver PHP/SQL statement

Recommended Posts

I am hoping someone can help me as i am scratching my head with this one.

I have a created a login page which allows users to login. I am trying to create a page that allows the user to view and subsequently edit there own informaiton. However my problem is that i am having trouble getting SQL statement i am using to generate the information from the table by using the persons log in name

Any ideas?

Share this post


Link to post
Share on other sites
I dont know if this will do you any good but try this

[code]
<?
$user = mysql_fetch_array(mysql_query("SELECT * FROM table WHERE username='$loginname';"));
?>
<table width="100%" height="100%">
<tr>
<td>Username:<td><?=$user["username"]?></td>
</tr>
<tr>
<td>Password:<td><?=$user["password"]?></td>
</tr>
</table>
[/code]

If this doesn't help you out, i would be happy to take a look at your script, contact me by email if you would like that!

Share this post


Link to post
Share on other sites
Use the Dreamweaver Update Form option to take care of that. Just make the page password-protected, and get the user ID from the session ID, or the cookie you use to edit it.

Share this post


Link to post
Share on other sites

×

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.