Jump to content

Recommended Posts

Posted

I own several web sites, but I have to create and update all the pages manually. For example, if someone signs up for a service using a form, their information will be sent to my e-mail address. I will then have to manually create their login page and enter their information.

 

I know that many web sites are automated. For example, someone is automatically a member of SFN when they sign up. An administrator doesn't have to worry about manually entering the information of each user. I would like my web sites to be the same way. I would like to create a database where new data can be added from forms, and also new web pages be created for members. They should also be able to update their information using another form.

 

I know it is possible to do this using PHP and MySQL. However, I can't figure out how to make any of this work. All the guides I can find online are way too complicated because I've never taken any type of PHP programming classes. I've even spent money trying to figure this out, but nothing is very helpful.

 

Does anyone know where I can find basic information about this subject?

Posted

Using a pre-built software would be your best bet. I don't know if a wiki would be suitable, but look up Joomla! and other such content management systems to see if they can do what you want.

 

If you need to write your own, learn the basic PHP syntax - how the language itself works - and then take a simple PHP script (something fairly uncomplicated that involves users logging in) and dissect it. If you need help knowing what a function does, just dive into the great PHP manual and enter the function's name in the search box in the upper right.

Posted

I purchased a PHP script that allows users to login and everything. However, I need to customize it to make it work with my services. The problem is that the source code for the script is very complicated. Most of the files link to other files, and I don't need most of the script's features. Also when I upload the script's files to the hosting server, I get the follow message when I try to access the site:

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

I'm not really sure what this error means. I know it is a Apache web server that is compatible with PHP and MySQL, so I'm not sure what I am doing wrong.

Posted

Do you have access to the error log? If you can show me the last few error messages you've gotten, I can see what might be the problem.

 

and btw, that doesn't sound like an Apache error message.

Posted

I don't remember how exactly it works, but you can put an activex program into a webpage using Visual Basic. That right there could take the information and store it in a database.

Posted

Can you type the script here? PHP is a good language for dynamic pages, but it can be quite an $$$ in terms of syntax and tiny errors. Write it here, maybe we can figure out what the problem is?

 

~moo

Posted

btw.. learning php is not that hard. a simple login script shouldn't have to use so many pages and link through them... perhaps using a simpler one would do the trick. And perhaps if you want to study the basics (even just to know how to deal with things and to "upgrade" yourself to dynamic pages) there are many sites that give good basic php/mysql tutorials.

 

And are free ;)

 

~moo

Posted

That is the standard Apache HTTP 500 (Internal Server Error) message.

Most likely your host is running PHP as CGI and you have not set adequate permissions for the PHP script. chmod it to 755, you can do this using an FTP program (right click file -> permissions on most).

Posted
I don't remember how exactly it works, but you can put an activex program into a webpage using Visual Basic. That right there could take the information and store it in a database.

No. Don't learn Visual Basic. ActiveX is not a web technology.

Posted
No. Don't learn Visual Basic. ActiveX is not a web technology.

 

 

 

I couldn't agree more, it also significantly limits your userbase.

 

And Herme3, seriousely PHP is easy put aside a weekend and find some good tutorials and you'll have it done in no time.

Posted
I know it is possible to do this using PHP and MySQL. However, I can't figure out how to make any of this work. All the guides I can find online are way too complicated because I've never taken any type of PHP programming classes. I've even spent money trying to figure this out, but nothing is very helpful.

I find this thread disturbing, herme3, considering that you have led us to believe that you do IT work professionally for paying business clients.

 

Why would you pay for a script that does not meet your needs and which you do not fully understand before asking for help?

 

The only way you should be learning PHP and MySQL is by directly referencing the original documentation, and by using worked examples from places like codingforums.com, where everything you can think of has already been asked and answered.

 

The manuals for PHP and MySQL are unfriendly at first, but if you use them properly you will quickly reap the rewards, I guarantee it. I haven't had "PHP programming classes" either but it's like a second language to me.

Posted

You have to use a scripting language like PHP or ASP, then with scripting magic you do this:

 

Yourpage.php

<form action="otherpage.php" method="post">
Signup:

<p>
Username: <input type="text" name="username"><br>
Password: <input type="password" name="password">
</p>

<p>
<input type="submit" value="register">
</p>
</form>

 

otherpage.php

I dont know PHP, so everything written below is wrong:

<? php

   mysqlConnect(mySQL)
   executeSQLQuery("INSERT INTO usertable
       values ('$username', '$password')")


   // You should probably check to see if the
   // username already exists in the database.
   // Just check to see if the number of records
   // where username = $username > 0.
?>

 

Thats all it really takes, just execute SQL statements with your scripting language.

Posted

If you can get your hands on it, VS 2005 is the way to go. Its the easiest and fastest way to build a server side web app. There are many asp.net programing examples in C#, J#, and VB.net on the Internet that do what you discribed that you can use to get started.

Posted
If you can get your hands on it, VS 2005 is the way to go. Its the easiest and fastest way to build a server side web app. There are many asp.net programing examples in C#, J#, and VB.net on the Internet that do what you discribed that you can use to get started.

 

:D It looks like herme3 has to work with a Lynux operating system running Apache, MySql, PHP etc. so the corporate Microsoft route probably isn't that useful in this instance...

Posted
If you can get your hands on it, VS 2005 is the way to go. Its the easiest and fastest way to build a server side web app. There are many asp.net programing examples in C#, J#, and VB.net on the Internet that do what you discribed that you can use to get started.

 

None of the above are true web oriented languages, maybe with the exception of APS and ASP.net. PHP, Ruby or Perl are probably your best bets - avoid anything involving ActiveX or other bad junk.

 

-- Ryan Jones

Posted
:D It looks like herme3 has to work with a Lynux operating system running Apache, MySql, PHP etc. so the corporate Microsoft route probably isn't that useful in this instance...

 

Heh, he could always use mod_mono... although I doubt that would work perfectly :P (I'm certainly not suggesting it but it is an option if he wanted to use ASP.Net :) My vote goes with PHP or possibly Rails or some other framework (never used it but if I don't say it... bascule might hurt me))

Posted

btw, don't forget to put security measures on your passwords (and use only "POST" for it)...

 

Encrypt your password BEFORE sending it through "post" (before the form sends it to the db) and use "post" (not "get").

 

a short nice script for encryption is here. Look for "Encryption PHP Tutorial" and you get lots of useful data.

 

if you want a sample script (full one) for it, let me know, I'll paste one of my own.

 

~moo

Posted
btw, don't forget to put security measures on your passwords (and use only "POST" for it)...

 

Encrypt your password BEFORE sending it through "post" (before the form sends it to the db) and use "post" (not "get").

 

a short nice script for encryption is here. Look for "Encryption PHP Tutorial" and you get lots of useful data.

 

if you want a sample script (full one) for it, let me know, I'll paste one of my own.

 

~moo

 

:D Good point about security, but your script runs server side - so, after the post...

 

Okay, this protects the database entry, but surely the only thing available at the client side is a series of caching instructions ('no cache' etc.) to the browser and an SSL (https) connection...

 

:-( ...unless you have other concerns / ideas???

Posted

Yeh you got a point there... hehe sorry

 

But it can be quite smart to use secure-transaction. I must admit I don't quite know a lot about it though..

 

~moo

Posted
:D Good point about security, but your script runs server side - so, after the post...

 

Okay, this protects the database entry, but surely the only thing available at the client side is a series of caching instructions ('no cache' etc.) to the browser and an SSL (https) connection...

 

:-( ...unless you have other concerns / ideas???

 

Use a little JS app to encrypt the password, then send it through POST and have a server side script to do anything important like checking the luser really exists.

Posted

Client side encryption via JS isn't really that effective. The effect of not encrypting the data verses the time spent writing long and pointless JS algorithms makes it unnecessary.

 

Encryption via JS isn't secure at all.

 

-- Ryan Jones

Posted

It shouldn't be that bad to encrypt the password through the serverside script, though, as long as you do it. The point of the encryption is to protect the password inside the database, not to protect the transaction.

 

If you think about it, someone "catching" the password as it is sent from the client to the server is exactly the same risk as that client having a key-logger "virus" that records his pass every time he logs in. You're not supposed to protect THAT stage, you're supposed to protect the server-side-database functions, which is why encryption is suggested.

 

~moo

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.