Question with PHP code

dpogary

New Member
Messages
134
Reaction score
0
Points
0
Ok i was wondering if someone could help me code a Login(password/user) script along with a profile...ive basicly got the Login down i just need to figure out how to make the profile...and have an Admin pages to edit them and have control over the users...any help is appreciated:thefinger

you can msg me or you can email me at
Dpo.inc@gmail.com
 
Last edited:

kryptonyte

New Member
Messages
216
Reaction score
0
Points
0
Go to the PHP section of http://www.pixel2life.com and take your pick at one of the user systems there. There are a few good User System tutorials that explain everything needed. After you get all that done you can start piecing together different scripts to get what you want. Most of them are explained quite well and that should help. If you need anymore help beyond that point just ask one of us here.
 
Last edited:

dpogary

New Member
Messages
134
Reaction score
0
Points
0
ok thanks ill take a look at that...what im trying to do is profile's, Private messaging and all that fun stuff for my personal site...
 

oab

New Member
Messages
918
Reaction score
0
Points
0
ill make it for you, can you be a little more specific as to what you want it to do though?

like whats a profile? exactly?
 

oab

New Member
Messages
918
Reaction score
0
Points
0
ohhh i see, i can do it i probably wont be done tonight though but i can try, i have nothing else to do anyway..
 

oab

New Member
Messages
918
Reaction score
0
Points
0
Or maybe you could just install a forum or portal script and only use the profile/pm part of it..

might be easier and more secure that what i will make. But im going to make it anyway since im going to make a site with php scripts anyway.
 

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
There is an edit button for a reason. Please use it next time
 

dpogary

New Member
Messages
134
Reaction score
0
Points
0
well i might be able to code it myself...i just kinda wanted help figuring out how to do it(learning still)...once i get the basics of it i will be able to code it myself i just need to figure out how to add an Admin section that can edit all profiles... and one for users to use to edit them himself


Edit: i was wondering if its possible with PHP
when i include 'cons.php'
and i set it in a folder from index.php
do i put '/new/cons.php'
is it possible to do i mean couse i tried that earlier and it didnt work?
 
Last edited:

oab

New Member
Messages
918
Reaction score
0
Points
0
should work, try taking off the first slash maybe?

And what fields do you want there to be in the profiles?

like, name address ect.??
 
Last edited:

dpogary

New Member
Messages
134
Reaction score
0
Points
0
ok this is what im thinking of for a start
i might change it later but probly just the basics for now

Name
email
age
Instant Messenger(icq,msn,aim,yahoo)
website
image url(Display pic)
(then there is another thing that i would need to add myself since its linking information from my game into the profile(like score's and user name and stuff)
Adittional info
residence
sex
Hobbies and Interests
Type of Person I Am


but it will be in probly a different order...im coding mine right now and i havnt gotten that far yet...im working on a log in script right now


Edit: on one of my pages im getting
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 5

how do i tell what spot on my file is line 5?
 
Last edited:

oab

New Member
Messages
918
Reaction score
0
Points
0
its the 5th line down in your php code, you just simply left out the ; at the end of the line, no biggie.

yea i havent gotten very far on mine either i keep getting distraced, the only problem i ran into so far is doing the "remeber me" thing so every time they go to your site they dont have to login again, i dont know how to use cookies yet so im going to have to look that up.

i will add those fields to my form i will probably be done in a couple days, i will updat you on my progress and post some examples soon.
 

dpogary

New Member
Messages
134
Reaction score
0
Points
0
PHP:
<?
include("cons.php");
$user = USER;
echo "Inbox | <a href="compose.php">Compose</a><br>"; $info = mysql_query("SELECT * FROM pm WHERE whoto='$user'");
if (READ) {
$read = mysql_query("SELECT * FROM pm WHERE whoto='$user' AND readit='no'");
$numread = mysql_num_rows($read);
echo "You have ".$numread." new messages";
}
if (mysql_num_rows($info) == 0) {
echo "<br>No messages in your inbox!";
}else{
 
if (SUBJECT && READ && TIME){
echo "<table><tr><td>Subject</td><td>From</td><td>Read</td><td>Time Sent</td><td>Delete?</td></tr>";
}

that is the first section of the code...going off of what you said im counting
PHP:
echo "Inbox | <a href="compose.php">Compose</a><br>"; $info = mysql_query
as my 5th line...is that correct? i still dont see were i am missing my ; tho:dunno:
 
Last edited:

oab

New Member
Messages
918
Reaction score
0
Points
0
put the mysql query on its own line and try it
 

dpogary

New Member
Messages
134
Reaction score
0
Points
0
:thefinger its still not working:(...this thing is grinding my gears trying to figure it out
 

oab

New Member
Messages
918
Reaction score
0
Points
0
PHP:
<?
include("cons.php");
$user = USER;
echo "Inbox | <a href="compose.php">Compose</a><br>"; 
$info = mysql_query("SELECT * FROM pm WHERE whoto='$user'");
if (READ) {
$read = mysql_query("SELECT * FROM pm WHERE whoto='$user' AND readit='no'");
$numread = mysql_num_rows($read);
echo "You have ".$numread." new messages";
}
if (mysql_num_rows($info) == 0) {
echo "<br>No messages in your inbox!";
}else{
 
if (SUBJECT && READ && TIME){
echo "<table><tr><td>Subject</td><td>From</td><td>Read</td><td>Time Sent</td><td>Delete?</td></tr>";
}
 

dpogary

New Member
Messages
134
Reaction score
0
Points
0
still not working...i started working on a dif page trying to get that one fixed up...the problem with this one now is the problem of my sub menu goes behind my Iframe...i was wondering if there is a code that would force the submenu to go over the Iframe...instead of forcing the Iframe more to the right
 

oab

New Member
Messages
918
Reaction score
0
Points
0
I STRONGLY advise you not to use an iframe!

what do you need it for?

btw: i got all my forms done im working on the javascript form validation right now..
 
Last edited:

dpogary

New Member
Messages
134
Reaction score
0
Points
0
i need to use Frames to keep everything the same page except the content page...my friend told me to use Iframes...i could change it to frames but i have no clue how to do frames
 

oab

New Member
Messages
918
Reaction score
0
Points
0
NO! dont use iframes or frames what are you talking about!?!?!?!?!

aaahhggggg frames suk!
 

dpogary

New Member
Messages
134
Reaction score
0
Points
0
what do you suggest i use?...i guess i could use headers.php and stuff like that...but i dont want the header to refresh itself because it would then replay the intro music thing everytime
 
Top