User Portal!

Trip

Registered
Is it possible to have a portal or something like it?

Easier yet: how (using GoLive/HTML) can I have it so when a user enters some information into a field it checks with some online database and makes sure the information entered is good information, then forwards the page to something else?

Get it? HELP!
 
Is GoLive a scripting language(I know I should really find out what it is one of these days)? If it's a dynamic web page scripting language, then it's probably possible.

Or, do you mean can you do it with something like PHP?
 
Oh, OK(thanks xaqintosh:)), well then Trip, without some kind of script on the server, you can't do it with just plain HTML.
 
you'll need to get into either Javascript in GoLive (non-secure if that's an issue)... Normal route with GoLive is to make a link, then add an action from the Actions palette (GoLive has a fairly healthy set of Javascripts/DHTML Actions). To learn more about these, check out GoLive's in-built Help system for a tutorial (lookup something like Add Action).

If it needs to be secure, you'll need to get into PHP (and MySQL if collecting data from a database server). This can be daunting, and you'll also need to setup your Apache OSX configuration with the PHP Module (see the How To's in this these forums). However, the rewards of getting something working are a fantastic feeling of achievement.

Check out www.hotscripts.com for 1000's of both PHP and Javascript scripts, all categorised. Most have good instructions to get you through the install procedures.

Any more questions let me know...;)
 
The problem with using Javascript is that you would have to store the login and password in the script, which is easily aquired by viewing the source of the script. Also, it wouldn't work very well for multiple users. You would have to change the script for every new user, instead of having one PHP script that handles an infinite number of users.
 
Security issues are not a problem here, the portal wouldn't be anything like pay-per-use, and no personal private information would be stored.

I'd be more than grateful if somebody could now help me to setup the portal, or setup an example one for me (Using GoLive+Javascript) that'd be great!

Thanks for all of your help guys!
 
It's been a while, but I'll give it a go:

Code:
<html>
<head><title>Login Page for Trip</title>
<script language="javascript">
	var username = new String;
	username.value = "bob";
	var password = new String;
	password.value = "bob";

	function verify(uname, pw)
	{
		if(uname.value == username.value && pw.value == password.value)
		{
			return true;
		}
		else
		{
			alert("Your login or password was incorrect");
			return false;
		}
	}
</script>
</head>
<body>
<form name="loginform" onSubmit="return verify(loginform.login, loginform.pw);" action="correct.html" method="get">
enter username:<input type="text" name="login" value=""><br>
enter password:<input type="password" name="pw" value=""><br>
<input type="submit" value="Login">
</form>
</body>
</html>


EDIT:
As you can see, someone can view the source code and see the login/password, and also just see where the form is going to take you, so there's not much point in using Javascript, except to keep out the people who know nothing about HTML or Javascript.
 
You would really need the user not to know where the View Source button is in the browser:eek: :confused: ... but if this really is not sensitive info, go the Javascript route. PHP User Authentification can be a pain.
 
It's not that hard to do authentication on the server using a script. I've done it with ASP, but not with PHP because I don't know PHP well enough yet.

Question:
Can you have stored procedures in MySQL?
 
Originally posted by devonferns
It's been a while, but I'll give it a go: "..."

Ok, sorry but: how do I add this to my webpage information and make it work? I don't usually do things like this. :(
 
You can just add the script part in between the head tags in your script.

Then you can copy the form to your page or make a similar form and have it call the script like I did in my example.
 
Slow down there! :D
mb you could throw something quickly together for me in GoLive and upload it to my carracho server or an ftp server so I can download it?

I'm really new to this kind of stuff, incase you couldn't tell!
 
Sounds great! But there _is_ one problem with that plan: I don't have an e-mail address. :/

Wait, never mind...my .Mac e-mail address should still be working until next month, right? w00t! Send it over!

flip180@mac.com
 
But I've decided to make the switch from GoLive 6 to Dreamweaver MX today! Tested MX all weekend and was very impressed, a lot more professional now.:D
 
You like Dreamweaver more than GoLive? You make me sick!
No, just kidding. Congrats and welcome aboard professional airlines. :p
 
Ok Trip, I emailed you the html files.

I had to change some of the script to make it work(which I thought I would have to do).

I'll change the code that I posted so that it's the right code.
 
Back
Top