Hi,
If you are using auto_increment and the id is relational to other tables, that could muck up a lot.
Say you had in a users table:
id | name
-------------
1 | Fred
2 | Joe
3 | Mary
And they each posted a message on a forum, so
id | userId | message
------------------------------
1 | 1 | Fred's message
2 | 2 | Joe's...
User Profile
Collapse
-
Hi,
How about this logic:
You have a table called "users"
In that, you have their details, such as first name, last name, username, password and you add "type".
"type" is an INT.
Now you make another table called "types" with the fields: id,name,url.
(I'm doing this off the top of my head).
So when the user...Leave a comment:
-
For this you would need (unless there is some database interactive javascript out there) PHP and mySQL (a server side language and a database).
The form would submit the information to the database, and the php would look up the database and display the information when the user visits the page.
You could use Ajax (uses javascript), but you would still need to have a server side language and a database....Leave a comment:
-
Leave a comment:
-
Hi,
Your ajax code seems to rely on IE (activeX). Try looking at
http://www-128.ibm.com/developerworks/web/library/wa-ajaxintro1.html
And use the cross-browser Ajax code.Leave a comment:
-
You would do something like this:
The text inbetween the <a> tags is not passed, what is passed is after the question mark ("message"), which in this example equals "hi".Code:<a href="page.php?message=hi">Message</a>
And in page.php you would get the message by
...Code:<?php echo $_GET['message']; ?>
Leave a comment:
-
Ping user
Hi
I am making a chatroom script and I would like to find out a way to detect whether a user is logged in. I'm using PHP and mysql.
I am assuming it would be some sort of CRON? Whereby it could ping all the users with logged in = true in the database and see if they have a cookie or if they load a test page...?
Any ideas? -
-
plz hurry up bye?
Anyway,
Try:
...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/html; charset=iso-8859-1" /> <title>Change
Leave a comment:
-
Ajax multiple setTimeout's problem
Hi
I am making a chatroom script and it appears that the problem seems to be that my setTimeout's are conflicting.
The logic is as follows:
- Run a login check every x seconds
- Run a trigger check every x seconds
The login check is a first priority, and may take some time to process.
The trigger check looks up the database, checks whether or not chatWindow = 1 (it is set to 1 when...
No activity results to display
Show More
Leave a comment: