Go Back   Novahq.net Forum > Computers > Web design and Programming

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-12-2005, 11:51 PM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
PHP (code not nuke) Help

ok well i've looked around (not very good searcher) and i can't find anywhere that teaches u how to make a login system ... lmao .. i've even bought a book PHP and MySQL for dummies ... emm well that was a alot of help ... it explained everyting ... but it didn't work ..and i even went and got the authors work and tried again ... no workie ..

so could someone help me out here


and also i was looking for a form scipt in php ... i just want to it to be able to do this:

person come to site ...
person fill out form ...
person submit .. it go to a email of my chosing ....
person get an email to the email they submited in form saying i recieved their form ....

and i use dreamweaver MX 2004

plz help me lol

tys
__________________
Reply With Quote
  #2  
Old 03-13-2005, 12:10 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

lol a lot of requests...

now i know this may be confusing but:

For your form...use the mail(); function and $_POST[];

For your User System

Provide more info, do you wish to use sessions, cookies, etc..etc..
also did u read teh book cover to cover? might help!!!
Reply With Quote
  #3  
Old 03-13-2005, 12:29 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,920

Bored

Include this file at the very top of your php files where you want users to login.. You can also use SSI to do this. Search google for ssi include.
Attached Files
File Type: txt login.txt (1.0 KB, 27 views)
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #4  
Old 03-13-2005, 12:29 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,920

BoredII

Very basic and not very formatted.. but it does what you asked.. yeah i'm bored..
Attached Files
File Type: txt mail.txt (1.1 KB, 22 views)
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #5  
Old 03-13-2005, 01:03 AM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
omg wow ... ty ... its late i'll work on it tomorrow ...

ty very much


btw i like your new site design


i did look at it quickly, i also forgot to mention, how to make a regisation page .. that conects with mySQL and stores data.. and then a login area the uses those users data (which u gave me)

how would i do that .. or where is a place that would tell me
__________________

Last edited by KoBrA; 03-13-2005 at 01:13 AM.
Reply With Quote
  #6  
Old 03-13-2005, 01:06 AM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
o and elite .. i didn't read it cover to cover ... i just read the several chapters contain the Members only Section ..

but i might read the rest to get info
__________________
Reply With Quote
  #7  
Old 03-13-2005, 06:21 AM
Stu is offline Stu
Resident Member

Join Date: Aug 2003
Posts: 3,319

re.

Hi kobra, heres some code for the registration page your after, remember to look carefully at the code to understand what its doing, dont just copy and paste it. The princibles are very basic;
- First I'm going to connect to the Mysql server (mysql_connect.php)
- Next I'm going to select a database (mysql_connect.php)
- Then I'll display the form for a user to fill in (register.php)
- When submit is hit, all the infomation will be submited to the tables for the selected database (register.php).
- We probally want to create the tables to, dont we? So I threw some code together for you (install.php)
- You'll need to edit the string vaules in mysql_connect.php
.
Code for mysql_connect.php
Code for register.php
Code for install.php
All this code has been tested and works, use panthers code with it, 'cause I know it does work . Hope you enjoy it
~ Regards
Reply With Quote
  #8  
Old 03-13-2005, 09:16 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

here's a script you'll need to change, but it's a very basic one:

PHP Code:
<?
/*Connect*/
$connect=mysql_connect("localhost","username","password") or die(mysql_error());
mysql_select_db("db",$connect) or die(mysql_error());

/*Form*/
echo'<form>';
/*Insert*/
if(!empty($userfile)){
//minor change to tecoma2's thing...
$get="SELECT * FROM db WHERE username='$username'";
$finish_get=mysql_query($get);
$check=mysql_num_rows($finish_get);
if(
$check>="1"){  //you may need to remove the qoutes, i'm not thinking that clearly yet....
echo'Nope';
}
else
{
echo
'Yes';
Do 
registration crapp....
}
?>
Now i didn't realize that tecoma2 made a whole script, until aobut half way through this...

Any ways mines a quicky, and tecoma2 nj, didn't realize you were learning php

and kobra, take a while and look some of this up, because if you can't connect to a database after reading the php&mysql for dummies, you need to read some tuts online
Reply With Quote
  #9  
Old 03-13-2005, 01:01 PM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
alrighty ... ty very much

yall been very big help
__________________
Reply With Quote
  #10  
Old 03-14-2005, 01:51 PM
Stu is offline Stu
Resident Member

Join Date: Aug 2003
Posts: 3,319

Yup elite, being doing well with it lately, been doing it for about 4 months, never posted much about it here.
Hope that helps you kobra, elite done some good stuff there to
Reply With Quote
  #11  
Old 03-14-2005, 06:42 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

lol been working on for about two freaking years...except now i'm choosing to really buckle down and work lol
Reply With Quote
  #12  
Old 03-15-2005, 07:17 PM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
o well i can connect to databases .. and run that kind of script ... just a matter of tiing the quey or w/e code to the registration form to is it creates the new info in tha table
__________________
Reply With Quote
  #13  
Old 03-16-2005, 04:18 PM
Stu is offline Stu
Resident Member

Join Date: Aug 2003
Posts: 3,319

Quote:
Originally posted by KoBrA
o well i can connect to databases .. and run that kind of script ... just a matter of tiing the quey or w/e code to the registration form to is it creates the new info in tha table
are you confused, or it doesnt work for you? Let me explain the registeration code...
- First off, it calls mysql_connect.php, which connects to the mysql server and selects the database.
- Next, if the title username in the form elements isn't empty, it will use the infomation in the $sql string to insert the data.
[1] Dont be confused by the $sql string.
[2] Its just a way of sorting infomation shorter
- Now it go's onto the $query string, which uses $sql as its caller, the $query string inserts the data in. And if theres an error, it prints it on screen.
- Then the else statement, it go's onto the HTML form.
- At the end of the document i put } to end that else statement
.
Hope that helped you, but you probally werent stuck anyway lol.
- Regards
Reply With Quote
  #14  
Old 03-20-2005, 09:52 PM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
ooo no i understand the scipt lol

im not confused

i was talkin bout my own coding ... and tryin to do it lol
__________________
Reply With Quote
  #15  
Old 03-21-2005, 10:30 AM
NaughtyPerry is offline NaughtyPerry
Banned

Join Date: Sep 2004
Posts: 1,665

lol t2 is alot of help get busy with our site btw lol
Reply With Quote
  #16  
Old 04-15-2005, 06:02 PM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
hum ... well now that i've to designs to apply this to ... everythign works except the login

all the code is the same as posted here, but i changed the mysql connect ...

something is wrong with the login code or im doing something wrong
__________________
Reply With Quote
  #17  
Old 04-15-2005, 08:29 PM
DevilDog#1 is offline DevilDog#1

Join Date: Jul 2002
Posts: 7,040

Login is the easiest to do if you know what you're doing.

(Hint: Start with basic idea and then add stuff to it. )
__________________








Quote:
If I don't do that doesn't mean I can't - DD#1
Reply With Quote
  #18  
Old 04-15-2005, 11:16 PM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
well that was a big help... NOT ..,

as i said the login does not work ... code and stuff appear on the page ... and u can't login with the registered info u entered on the registration page

could someone help me, im using the code that was presented on the first page
__________________
Reply With Quote
  #19  
Old 04-15-2005, 11:29 PM
DevilDog#1 is offline DevilDog#1

Join Date: Jul 2002
Posts: 7,040

When asking for help there are certain rules:

1. Be nice.
2. Don't insult others.
3. Don't be sarcastic.
4. Explain the problem complete and do not babble like a mindless drone.
5. If you get errors post it.

Now you were saying?
__________________








Quote:
If I don't do that doesn't mean I can't - DD#1
Reply With Quote
  #20  
Old 04-15-2005, 11:38 PM
KoBrA is offline KoBrA
Registered User

Join Date: Jul 2004
Posts: 25

Send a message via AIM to KoBrA
well same to u ... but u didn't have to say that in the first place ..

now srry bout that ... but the problem is just as above .. either is my webserver or the code ... the code is on the first pace where Panther so nicly posted it, then Tecoma posted the other parts...
the login is not working for me ... when i mean not working its not working .. like it won't login ... and there is scipt showing too

http://www.kobra.daveswebhosting.net...ance/login.php

u can move to that directory and got to the register page and try loging in
then you will see what im talking about
__________________
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Php Nuke General Nuisance Web design and Programming 5 11-21-2004 08:43 PM
PHP Nuke :| NaughtyPerry Web design and Programming 2 11-08-2004 04:15 PM
How Do U Use Php Nuke? Wilson1990 Web design and Programming 11 08-05-2004 08:29 PM
PHP NUKE SKINS XenoMorpH Web design and Programming 7 04-06-2003 06:34 AM
PHP Nuke 6.0 Help hodog Web design and Programming 3 10-17-2002 04:32 AM


All times are GMT -5. The time now is 05:58 AM.




Powered by vBulletin®