Jump to content
php.lv forumi

pārtaisīt uz mysql


ziedinjsh

Recommended Posts

Sveiki,

 

Lgon sistēmā pie config.php faila ir:

$config_username = 'demo';
$config_password = 'demo';

 

Ielogoties tikai var ar username:demo password:demo

 

kā varētu viņu piesaistīt pie mysql un lai viņš lāsītu no mysql lai var ielogoties ar email un pass ?

 

Pie attachments ir visi faili :)

login.zip

Edited by ziedinjsh
Link to comment
Share on other sites

kas tieši nav skaidrs? pats mēģināji kaut ko uztaisīt? neviens bezmaksas neko netaisīs tavā vietā.

 

$sql = sprintf("SELECT * FROM users WHERE user = '%s' AND pass = '%s'",$user,$pass);
if (mysql_num_rows(mysql_query($sql)) > 0) 
   $logged_in = 1;

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...