Read Latest Entries..: (Post #18) by fffanatics on May 25 2005, 11:03 AM. (Line Breaks Removed)
Yes my code does work and i do actually use cookies. I use to cookies so that they have the option of not having to sign in for 2 weeks. However, this is the only information that is cantained in the cookie. Personally, i like sessions cause its very easy to use and is a secure way to send and recieve information from a page... read more.
Hey everyone. I have a login script that i know works. My question is that on my main page, it have a form to allow the user to log in. What i want it to do is that once the user logs in, the form disappears and the users data (aka username) is displayed where the form was. At the moment i cant get it to work. Below is my code.
CODE
<div id="loginMenu"> <?php if ($logged_in == 1) { ?> <!-- User information --> <?php }//if else { ?>
What happens with this code is that it only will display the form because the user isnt logged in. If i refresh the page in IE it will then display it. There has to be a way to dynamically change it once the user submits the form. THanks for the help
OK thanks for the reply and sorry about not using the code tag. i didnt even notice that it was a tag so sorry.
What i was asking was that it would display the login box in the loginMenu div but once the user hits submit in the form, that the user logs in (which my script works) and then instead of showing the loginMenu, it would display the users information. Thats what the if (loggedIn) was for but what i think happens is when the user logs in, the page isnt refreshed so it doesnt even see whats in the if.
Hopefully someone can help. Thanks agian and sorry about not using the code tag
i think it's with $logged_in not beeing assigned with the right value
Yeah i know my auth system works cause i can produce a login script that works when on a separate page. However, who wants to change pages just to log in. It has to be with teh $logged_in variable. This is the order of operations that need to happen along with which ones work:
1.) Users enters fffanatics and decides to log in using the form (works - it is the else)
2.) THe user hits submit and is authenticated (works)
3.) Now instead of the form still being on the page, it should display the users information instead (doesnt work)
I just cant seem to get to form to go away after the user hits submit. Hopefully this clarifies the issue.
i belive that there is no way you can gather all the data about the user when he logs in and then display it with out another page or a script processes it. you have to make your script log the user in then redirect it again to the page with his details displayed.
I write this Easy Login in php and i want to learn to you how to write easy password login its sample of my code its not a user pass login
CODE
<?php <?php if(!$action) { print (" <body bgcolor='#ffffff'> Admin Panel - Set Quiz ::<P> <form name='forum2' method='post' action='$PHP_SELF'> <p>Password <input type='text' name='password' size='20'> <P><input name='Submit2' type='submit' value='Quiz'> </form>"); $max = "my password"; if ($password == $max){ print (" <body bgcolor='#ffffff'> Admin Panel - Set Quiz ::<P>---- ///And then you can post and write your html tags of your html page here for display when password is true\\\\"); } ?>
its really easy i write this password login for my online exam
OK so if i understand all of you correctly, what i should do is have the user log in (run my log in script) and then redirect them to the correct page that would contani their information?
I have my website set up that after you go to the index page, you must log in to go futher. Once you log in, you are directed to another index page with a Welcome! script and member-specific info. When you set up your form to process, direct the form to a processing page that verifies your user then directs to a welcome page (a copy of your index) and modify that page to whatever welcome content you wish!
This is my form processing code:
CODE
<form action="checkuser.php" method="post">
In checkuser.php, after all variables have been checked and the user verified, I have this:
mysql_query("UPDATE users SET last_login=now() WHERE userid='$userid'");
header("Location: welcome.php");
}} else { echo "<center><font color=red><strong>You could not be logged in! Either the username and password do not match or you have not validated your membership!<br /> Please try again!</strong></font></center><br />"; include 'index.php'; }
I hope some of this helps you. I know that was a huge chunk of code for just a little info, but I was afraid of leaving out something you might need. Good luck!
Yes my code does work and i do actually use cookies. I use to cookies so that they have the option of not having to sign in for 2 weeks. However, this is the only information that is cantained in the cookie. Personally, i like sessions cause its very easy to use and is a secure way to send and recieve information from a page
Why not just use cookies to keep your users logged in? It's a lot easier using sessions, in my opinion. All you would have to do is add a new variable to the config file that is something like this:
Hey everyone thanks for your help. My login script works 100% now. The error was because i had a blank line after the ?> in the one file i included. Thanks for all of your great ideas and solutions
Hmmz thanks for the help but i am not looking to really rewrite a good amount of my code. I just was wondering if anyone knew how i could fix this error since it must be a small one if i dont get it on my server but do get it on the trap17 one
Instead of directing the user to the registration page right away , you could just echo that they are not registered and then give them a link to the registration page.
Hello friends , just now i came accross a particular type of script which is capable of masking the
URL which is seen in the Address bar of the webpage , that is by implementing the particular Java
Script when the user visits a page eg. www.mysite.com , then it is possible for the admin of
www.mysite.com to mask this site and display some other website in the viewers address bar. I came
to know that such a script can be written using Java Scripts , Can any one get me the Script ??....
As per the description above, I would like to challenge the GFX people here on the Trap17 to design
a nice, bright, clear, professional looking 'avatar' for me and other members to use. I
plan on including it in my Rotator Script, which I think can be found in the Tutorial Section here
on the Trap17. (If not, I must write that one soon). /laugh.gif" style="vertical-align:middle"
emoid=":lol:" border="0" alt="laugh.gif" /> I'm thinking that we need to open this up as a
Competition so all Members can contribute and then the Admins can start a new section in ....
Hey everyone! I am helping someone make a login system using MySQL databases and a PHP login
form. I have a fair bit of experiance in HTML and some javascript too. I have virtually no
experiance in MySQL or PHP. Anybody know of any good PHP login systems that allow you to creat a
personalised page for each user and when they login the system transfers the user to their page.
Another thing that the system MUST have is a way of stopping unwanted users entering someones page.
CODE For example lets say I register and my UN is jesse123 and my personalised pages a....
Hi, Im working on a website, and im trying to make a right-click menu, which opens on right click,
wherever the cursor is, and closes on mouse out. I wrote the code below, and when i ran it in IE it
ran fine, just how i wanted it to work. However in firefox, the menu just opened in the top left. im
presuming this is because it doesnt like my style changing in the javascript. Any ideas, and
suggestions? If i cant make this work, i will just make it so it works slightly differently when
viewev in firefox so that it can just open in one place. All ideas appreciated. ....
I have seen a post on here somewhere which shows how to make a simple newsletter php script. I
cvant find it anywhere and I wanted to ask some questions of the author. Does anyone know the one I
mean? Cheers ....
I have tried everything to login FTP and I get a bad login every time. I can login to cpanel and do
all other functions including changing the password which updates all running services such as the
FTp server but to no avail. I have used numerous ftp clients , PASV, active and all. Tried security
(SFTP)... nothing.....
Hello everyone not been on for AGES! we had net problems and i had to move to qupis and now
I've got problems. I'm making a social networking site using this script and I cant get it
to install Everytime I go to the install page i get this QUOTE Warning: session_start() :
open_basedir restriction in effect. File(/home/kasiks1/tmp) is not within the allowed path(s):
(/home/karlos:/usr/lib/php:/usr/local/lib/php:/tmp) in
/home/karlos/public_html/phpazi/install/index.php on line 1 Fatal error: session_start() : Failed
to initialize storage module: file....
For some reason when I try to logon from the main page it doesnt work, it just brings me to the
forums unlogged. Anyone here have any ideas whats wrong with my coding? Heres the webpage:
www.ageofilluminati.com Heres the coding im Using: QUOTE
Forgot password? Register for free! ....
I have install windows 2003 server and some application like iis, share point, etc.my development
time want remote desktop for few user so I want multiple user to login my server but I have not
install active directory and I don’t want to install so tell me the best way to resolved the problem....
Alright I am trying to have a PHP FTP Upload Form that allows the user to create the directory
folder for where they want to upload there files to. example: Main Directory: vainsoft.com There
directory: vainsoft.com/modeling or vainsoft.com/photography But I dont want them to be able to
upload things into the main directory, only sub-directories, is that possible with this coding that
I have: //uses $_FILES global array //see manual for older PHP version info //This
function will be used to get the extension from the filename function get_extension($fi....
I've been looking all over the net for a PHP script which can provide an interface to browse a
downloads database. The database could be powered by MySQL. If you know a script like this, please
post it here. Thanks in advance, Ironchicken.....
Background Image Changer Script To swap the background image from your CSS file according to the
Server Clock Time. 1.) In your CSS file, add the following rule: CODE body {
background: url(time.png); } 2.) Create a "folder" named time.png. 3.) Into the
folder, place three images named morning.png, day.png, night.png. 4.) Also, in the same folder,
create an index.php file and copy/paste the following script. CODE <?php $hour =
date('H'); if ($hour < 12 ) { $image =
"morning.png"; } ....
Hello. This is my first web tutorial ever. This is basically a simple register and login script.
Yes, I know it’s a bit rubbish but I’m quite new to PHP/MySQL. Here’s the register form. This can
be any file extension you like. I’d recommend calling it register.html . CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml"> <head> <meta
http-equiv="Content-Type" content="text/ht....
Hi all, Its Aldo. anyways, I wont be using the method of pagination, i will just tell you how to
make a basic online now script. When someone logs in, now take into consideration that the name of
the username input is username ( First ,create a table in your database saying online now and add 2
fields to it. id and username CODE id type=integer(INT) , auto increment, length =255
and username = VARCHAR length=the limit a username should be in your site now from there we take
off : CODE <?php //logged.php //authentication script //connection scri....
so most of you guys know mig33. its a wap application,probaly java.most kindly to be java. does
anyone have java knowlege or knows where i can get a chat script like mig33? i also know this server
supports jsp so im planing to use it for my application. i was hosted here last year but moved
because i found a better host. now im back just to use the jsp on this server. Im planing to run
chat applictions so if any one wants to help me in my project let me know.....
Hi, I came across this website www.planmylifestyle.com which offers an innovative login system. In
the traditional login system, a user is asked to enter a username and password besides many other
personal information. In this website, to register the site creates an ID file that the user can
download to the local hard drive. After registration, to login to the website, the user has to
simply upload the registered ID file (browser and select ID file from local hard drive) and click on
the Login Button. The user is then taken to the website which seems to be a searc....
Hi, We have introduced a link Exchange Script at Trap17. http://www.addlivelinks.com/ The
categories are yet to be setup. It will be done as we receive link requests. Thanks. -OpaQue....
This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
Scripts site. Just in case the site may not show, I will include the code here: List of things
needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
transparent gif image with the watermark - goes in the same directory as this script // ....
This simple script will allow you to run some basic checks to make sure that any email address
entered is actually an email address. There is no guarantee offered that this will stop every single
fake email address, but it'll provide some protection. Now, the code! First we need to get
the email address to verify. Here, I get it using POST from an HTML form. CODE <?php //Load
email address from web form $email = $_POST['email']; Now, we move on
to our first check. Does the text that has been entered look like it could b....
How do i have to do, to tell a frame to wait x seconds after it continues playing? In Macromedia
Flash, of course... Like: CODE stop(); "wait x seconds"; play();
Thanks....
First of all, I am NOT a programmer, this is something my friend taught me. It describes basic
interaction with the user, while showing basic functionality of this simple programm. So, without
further ado, we're off to the tutorial: First of all, start your visual basic, when prompted
for new project, select Standard Exe . Next, we need to open code window, so we can start typing
the program. This can be done in two ways, one is double clicking on the form, or selecting Code
from View menu. If you double clicked on the form, you will see following text: CODE ....
Hi! I'd like to make a guestbook with a cgi-script I found at Lissa Explains it All .
There were instruction bout how to install this gbook: click here QUOTE Active Guestbook
Unzip the file, you'll find 4 separate files: guestbook.cgi mail.gif url.gif readme.txt 1.
Open guestbook.cgi in a plain text editor like notepad. Find out your path to perl from your Web
host, and change the first line to reflect that. The default setting, #!/usr/bin/perl, usually
works for most servers. If not, you can try #!/usr/local/bin/perl. Save your changes. ....
We all know of anonymouse web surfing, Sites like http://anonymouse.ws/cgi-bin/anon-www.cgi Offer
peope to surf the internet anonymousely, The site has baners and ads showing up and does not support
all links. Does anyone know what script they use or where i could get one from, What script do they
use? Also if anyone jnows how to make my own? I really want this as a addon for my site, So all help
would be appriciated. Thanks, Mbd5882....
CODE <HEAD> var popUpWin=0; function popUpWindow(URLStr) {
if(popUpWin) { if(!popUpWin.closed) popUpWin.close(); }
popUpWin = open(URLStr, 'GunBound Tactics: Screenshots',
'width=820,height=550,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,top=90,left=90')
;; } </HEAD> <BODY> <a
href="javascript:popUpWindow('/f11/clipped.php');"><b>Clips&
#60;/b></a> This is a script for opening a new window. It works ....
Its an complete login sistem made and tested by me and I think itwill be very usefull for people who
are tryn to learn PHP. First, let's make register.php: CODE <?
include("conn.php"); // create a file with all the database connections
if($do_register){ // if the submit button were clicked if((!$name)
|| (!$email) || (!$age) || (!$login) ||
(!$password) || (!$password2)){ print "You can't let
any fields in blank....
Looking for php, login, script, removing, login, field, user, logs
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.