Page 1 of 2

Super Lost!

Posted: Thu Jan 06, 2011 5:06 pm
by kclark
I'm building a website in PHP/MYSQL documents written in xhtml 1.0 strict and I'm trying to write a php script that keeps track of the number of users of my site, goals uploaded to my site, and goals accomplished by my site. I'm assuming I'll create a goals accomplished tab for the users to click to indicate that. Currently my website isn't launched so the code would read 0,0,0 these statistcs are going to e on the homepage. How would I go about creating this?

Re: Super Lost!

Posted: Thu Jan 06, 2011 8:24 pm
by Christopher
kclark wrote:I'm building a website in PHP/MYSQL documents written in xhtml 1.0 strict
I would recommend HTML because with HTML5 it seems like XHTML is going away.
kclark wrote:I'm trying to write a php script that keeps track of the number of users of my site, goals uploaded to my site, and goals accomplished by my site.
- If you are counting users then I assume that they need accounts so they need to register and login.
- If they are going to upload goals then are the goals in a file?
- What are they goals?
- How are they "accomplished"?
kclark wrote:I'm assuming I'll create a goals accomplished tab for the users to click to indicate that.
Ok.
kclark wrote:Currently my website isn't launched so the code would read 0,0,0 these statistcs are going to e on the homepage. How would I go about creating this?
If you could get one thing working on this site first -- what would it be?

Re: Super Lost!

Posted: Thu Jan 06, 2011 10:34 pm
by kclark
I'd like to get the forms completed, you know like the forms so users could register for the site as well as complete the header and footer for my homepage. These would be the things I have like to complete, the About page is going to be simple and I'm basically done with the contact page I just need to clean it up more.

Re: Super Lost!

Posted: Fri Jan 07, 2011 2:21 am
by Christopher
So it sounds like the first thing is registration (you can decorate the pages with headers and footers later). When a person registers:

- What is their unique ID -- their email or a username (I'd recommend the former)?
- What other information do you absolutely need to know about them?
- Is there any information that you want to optionally collect?

Re: Super Lost!

Posted: Fri Jan 07, 2011 2:21 pm
by kclark
I'm collecting their

first and last names
pass word
address (optional)
city
state
country
education
email
phone number
zip code
date of birth
using a CAPTCHA code at the end of the form

Re: Super Lost!

Posted: Fri Jan 07, 2011 4:14 pm
by Christopher
I assume that you will use their email as their unique ID. Ao your user schema might look something like this:

id INT
active CHAR(1) DEFAULT 'Y'
email VARCHAR
password VARCHAR
first_name VARCHAR
last_name VARCHAR
address VARCHAR
city VARCHAR
state VARCHAR
zip_code VARCHAR
country VARCHAR
education VARCHAR
phone_number VARCHAR
date_of_birth VARCHAR or DATE

With id as the PRIMARY KEY and an INDEX on email

You will need to pick appropriate lengths for these fields. If you are storing the password as a hash then the hash length will determine the size of that field. Also, education may include multiple data points if it is not simple the maximum education level. If so you would need a user_education table to store those entries.

Have a go at a MySQL schema and then tell us a little about how you want registration to work.

Re: Super Lost!

Posted: Sun Jan 09, 2011 11:25 am
by kclark
I think I'm going to keep this Super Lost thread going until my website is finished then I'm going to hyperlink my site to phpdn then when my site hits it's first million members I'm going to come out and say I didn't know anything without the help of php dn to spike up traffic to this site as well. I've been doing everything you told me to do and I'm also working to build the template as well. I've actually been completing one thing for the site a day on average which I think is amazing since I'm working alone to build it. In regards to your education question I only wanted to list all of the colleges and universities in the world. So when the user goes to start typing the letter the schools will appear. So I think I would have to also build a database withthe names of schools and query it back to the user? Right or wrong?

Re: Super Lost!

Posted: Sun Jan 09, 2011 6:08 pm
by Neilos
kclark wrote: I only wanted to list all of the colleges and universities in the world.
Only. lol.
kclark wrote:So I think I would have to also build a database withthe names of schools and query it back to the user? Right or wrong?
You would need a table containing all the schools and any info etc...

Those auto suggest search boxes are generally coded using AJAX, where it reads what the user has so far, queries this and returns sugestions based on the query. Just an FYI.

Re: Super Lost!

Posted: Sun Jan 09, 2011 11:58 pm
by Christopher
kclark wrote:I think I'm going to keep this Super Lost thread going until my website is finished then I'm going to hyperlink my site to phpdn then when my site hits it's first million members I'm going to come out and say I didn't know anything without the help of php dn to spike up traffic to this site as well.
That would be grand!
kclark wrote:I've been doing everything you told me to do and I'm also working to build the template as well. I've actually been completing one thing for the site a day on average which I think is amazing since I'm working alone to build it. In regards to your education question I only wanted to list all of the colleges and universities in the world. So when the user goes to start typing the letter the schools will appear. So I think I would have to also build a database withthe names of schools and query it back to the user? Right or wrong?
Yes, but that sounds like it is a data collection problem for down the road. You might want to allow users to enter their university and build the list from the data entered. It could match if found or be added if it is new.

So what do you have so far? And what the next thing that is important?

Re: Super Lost!

Posted: Mon Jan 10, 2011 3:46 pm
by kclark
The contact and about us page are simple and I'm totally confident in them. Basically I'm working on the homepage,user page, and the upgrade account page. I'm trying the homepage and userpage done this will basically almost get us in Beta. I downloaded mysql,php,and apache for the first time yesterday. I think the user page is going to be really complex and take the longest so I'm focused on the registration form and finishing up the homepage.

Here is exactly what I'm doing now. I can't neglect the user page so I'm going to start it and allow users to write in their goals and upload their before and after pictures to it. What I need is a script that will redirect those pictures uploaded on the user page back to the homepage and smash them down to say 20x20 or 10x10 whichever will make the page run faster (probably 10x10). The script also needs to take the pictures off of the homepage once the page is full which will be months from now so I wouldn't need that command right away.

Re: Super Lost!

Posted: Mon Jan 10, 2011 4:11 pm
by Neilos
kclark wrote:I think the user page is going to be really complex
Take it in small steps. Implement one thing then another. The thing you want to avoid is making it complex, it can be complicated but you'll want to keep the steps logical and simple. If you get what I mean, it is really frustrating when you have a mess of code in front of you that you wrote a week ago and you need to figure out what it does because you can't remember and it is so hard to follow your brain hurts!
kclark wrote:and smash them down to say 20x20 or 10x10 whichever will make the page run faster (probably 10x10).
10px x 10px? That is incredibly small lol. Also you'll not want to be smashing them on every page load. Smash them once and store different sized copies of the original to display. Well that's what I would do, if I understand what you want to do correctly.

Re: Super Lost!

Posted: Wed Jan 12, 2011 12:30 am
by kclark
Neilos wrote:
kclark wrote:I think the user page is going to be really complex
Take it in small steps. Implement one thing then another. The thing you want to avoid is making it complex, it can be complicated but you'll want to keep the steps logical and simple. If you get what I mean, it is really frustrating when you have a mess of code in front of you that you wrote a week ago and you need to figure out what it does because you can't remember and it is so hard to follow your brain hurts!
kclark wrote:and smash them down to say 20x20 or 10x10 whichever will make the page run faster (probably 10x10).
10px x 10px? That is incredibly small lol. Also you'll not want to be smashing them on every page load. Smash them once and store different sized copies of the original to display. Well that's what I would do, if I understand what you want to do correctly.
Ok then I'll use 20 x 20 but I want to set up like Daily Booths homepage where the photos are updated to the homepage in real-time. I want that concept but my homepage isn't going to look like Daily Booths I have an Aristotle quote underneath my header and below that I have a central image which will remain in the middle on the page. All around that image will be the photo's uploaded in real-time and that is what I'm trying to code.

Re: Super Lost!

Posted: Wed Jan 12, 2011 1:20 am
by Christopher
Daily Booth's are 67x53.

Re: Super Lost!

Posted: Wed Jan 12, 2011 5:33 am
by kclark
I think that's too large I'll go with the 20 x 20 and see how it goes, I want the page full of smaller pictures so the user will have a smoother experience. I have a quote that I live by "Work in microseconds"

Re: Super Lost!

Posted: Wed Jan 12, 2011 4:06 pm
by Christopher
kclark wrote:I think that's too large I'll go with the 20 x 20 and see how it goes, I want the page full of smaller pictures so the user will have a smoother experience.
I don't know if you will be about to see what the picture is that small, but give it a try.
kclark wrote:I have a quote that I live by "Work in microseconds"
Don't be microsecond wise and manhour/user experience foolish. ;)