PHP Login Script Sessions

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   PHP Login Script Sessions
Weered
CZ Newbie
Weered has been a member for over 9 year's 9 Year Member
Status: Offline
Joined: Aug 07, 2009
0.00 posts per day
Posts: 5
Points: 0
   
Hi everyone,

New to the forum.

I have been searching high and low for a script that will work with PHP-Nuke. I have made probably 6 different scripts that will work with the MD5 password encryption but will not register the session variables. Which means that when you submit your information on this initial "splash page" and it verifies your user name and password, it will redirect you to the PHPnuke site as a guest and won't actually log you in.

I am wondering if anyone knows of a pre-site login script for a PHPnuke site/database?

Any help would be most appreciated.



Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 15 year's 15 Year Member
Occupation: Self Employed
Age: 40
Fav. Sports Team: Detroit Red Wings
Website: www.codezhost.com
Status: Offline
Joined: May 26, 2003
1.45 posts per day
Posts: 8090
Points: 494,345
   
You should be able to send the username and password into the Your_Account module from any form on your server.


<form method="POST" action="modules.php?name=Your_Account">
<input type="hidden" name="op" value="login" />
<p>Username: <input type="text" name="username" size="30" /></p>
<p>Password: <input type="password" name="user_password" size="30" /></p>
<input type="submit" name="submit" value="Login" />
</form>




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: PHP Login Script Sessions
Weered
CZ Newbie
Weered has been a member for over 9 year's 9 Year Member
Status: Offline
Joined: Aug 07, 2009
0.00 posts per day
Posts: 5
Points: 0
   
wow. That was so simple? Thank you very much.



Back to top Reply with quote
#4   re: PHP Login Script Sessions
Weered
CZ Newbie
Weered has been a member for over 9 year's 9 Year Member
Status: Offline
Joined: Aug 07, 2009
0.00 posts per day
Posts: 5
Points: 0
   
Alright, I have a new problem.

Like my first post, I am trying something similiar accept it pertains to the actual user registration. Which path should my form submit the new information to in order to trigger the PHPNuke registration process?



Back to top Reply with quote
#5   
Telli
Site Admin
Telli has been a member for over 15 year's 15 Year Member
Occupation: Self Employed
Age: 40
Fav. Sports Team: Detroit Red Wings
Website: www.codezhost.com
Status: Offline
Joined: May 26, 2003
1.45 posts per day
Posts: 8090
Points: 494,345
   
You have to pass the "op" through the form.

For new user registration:


<input type="hidden" name="op" value="new_user" />




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   re: PHP Login Script Sessions
Weered
CZ Newbie
Weered has been a member for over 9 year's 9 Year Member
Status: Offline
Joined: Aug 07, 2009
0.00 posts per day
Posts: 5
Points: 0
   
I added that in and am still unable to make it function properly. Here is the code I am using. I apologize for all the additional formatting code.
<td width="157"><form method="POST" action="PHP/html/modules.php?name=Your_Account&op=new_user">
<p>&nbsp;</p>
<table width="400" border="0" cellspacing="0" cellpadding="3" background="http://campushalifax.com/loginbg.png">
  <tr>
<input type="hidden" name="op" value="new_user" />
<td width="115"><img src="username.png" width="115" height="29" /></td>
<td width="261"><input type="text" name="username" size="30" /></td>
</tr>
<tr>
<td width="115"><img src="password.png" width="115" height="29" /></td>
<td><input type="email" name="user_email" size="30" /></td>
</tr>
<tr>
  <td><img src="password.png" alt="" width="115" height="29" /></td>
  <td><input type="password" name="user_password" size="30" /></td>
</tr>
<tr>
  <td><img src="password.png" alt="" width="115" height="29" /></td>
  <td><input type="password" name="user_password2" size="30" /></td>
</tr>
<tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
</tr>
<tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
</tr>
<tr>
  <td colspan="2"><div align="center">
    <input type="submit" name="op" value="new_user" />
  </div></td>
</tr>
</table>
      </form></td>



Back to top Reply with quote
#7   
Telli
Site Admin
Telli has been a member for over 15 year's 15 Year Member
Occupation: Self Employed
Age: 40
Fav. Sports Team: Detroit Red Wings
Website: www.codezhost.com
Status: Offline
Joined: May 26, 2003
1.45 posts per day
Posts: 8090
Points: 494,345
   
Change this line:


<input type="submit" name="op" value="new_user" />


To:


<input type="submit" name="submit" value="Submit" />




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   re: PHP Login Script Sessions
Weered
CZ Newbie
Weered has been a member for over 9 year's 9 Year Member
Status: Offline
Joined: Aug 07, 2009
0.00 posts per day
Posts: 5
Points: 0
   
Ah thanks, I didn't see this until today but I did get it working. Turns out the version of phpnuke I am using doesn't log it as "new_user" but just "new user". Thats all I had to change!

Now for my next issue lol.

Basically I am trying to make it so that unless you are logged in you cannot see PHPNuke at all. Everything is going to be managed from just html pages. So right now I have a splash page with a login form, which links to a disclaimer/registration page and a lost password page. All of these work but they link into PHPnuke no matter what when submitted.

Is there a way to have it so that when something is entered incorrectly or say when someone registers they are re-linked to a page explaining they will receive an email or an error page. Which would then redirect them to the initial login/splash page.

Ugh, this is hard to explain.



Back to top Reply with quote
#9   
Telli
Site Admin
Telli has been a member for over 15 year's 15 Year Member
Occupation: Self Employed
Age: 40
Fav. Sports Team: Detroit Red Wings
Website: www.codezhost.com
Status: Offline
Joined: May 26, 2003
1.45 posts per day
Posts: 8090
Points: 494,345
   
Unless you make your own signup page that just enters there information into the database your going to have to use the Your Account module.. which means they will have to see the site.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum