This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
View Entire Thread
Re: nead help with some code

Oh, and to address the question about live updating, it's carried out via AJAX/javascript. The most common way is to assign a function to a key press or key up event to a form field that submits the value of that field to a php page and uses the returned value to change the page in some way. It's probably easier to return the value as JSON (PHP 5+ has a function to convert an object or array to json)

Browser: Mozilla Firefox 4.*

OS: Windows 7

Re: nead help with some code

I had a look at your code and posted some changes here (untested) http://www.scutterman.com/Bravenet/kingjack-medieval-registration.txt

I modified the forms to only use $regform and make the form code:
* More readable
* Have no duplicated code
* Allow the servers to remain selected if the validation tests fail
* Allow easy addition of servers, or even automated population of servers from a database

Some suggestions I would make are:

* Why put a maximum length on a password? Especially since you're hashing it.
* If you're using a server that uses magic_quotes_gpc, don't rely on them to make your database queries secure. Always run your own validation on input that ensures that it is safe to use in a query, or use PDO for database functions and PDO->prepare() if you have access to it.
* The rand() function can produce predictable results, consider mt_rand() instead
* When INSERTing data to the database, specify the columns you're inserting before specifying values. That way it's easier to change the database structure without breaking existing code.

Browser: Mozilla Firefox 4.*

OS: Windows 7

Re: nead help with some code

sorry for taking so long to reply but talking about the little forum i told you about made me remember i have had a problem with it and thats why i stopped work on it so i tried to work on the problem again and just can not figure out why it is not working this is the link to the code that i think is the problem the-code

Browser: IE 8

OS: Windows

Re: nead help with some code

Hey, sorry for my late reply, I was away for a bit. What in particular is the problem with the forum?

Browser: Mozilla Firefox 4.*

OS: Windows 7

Re: nead help with some code

i have looked over the code many times but i just can not figure out why it is not working when you click edit reply a drop down is supposed to come but it doesnt do anything it is strange and realy annoying because it messes up my site a lot

Browser: IE 8

OS: Windows

Re: nead help with some code

The $(this) selector doesn't have any children in that context, you need to use $(this).parent() as per this modified example http://scutterman.com/Bravenet/js-show-hide/

As an aside, ensure your dom structure is valid, and try not to use depreciated elements like - the W3C validator and a valid doctype can help with this.
If you look at the example, some of the structure and css has been modified to adhere to XHTML 1.0 Strict.
I'm not sure of the doctype or underlying structure of your live version, but I usually work in strict to ensure future compatibility.

Browser: Mozilla Firefox 4.*

OS: Windows 7

Re: nead help with some code

it works not to sure how yet nead to look at the code but the close button does not work

Browser: IE 8

OS: Windows

Re: nead help with some code

I modified it to use .closest() rather than .parent() and it's working now.

Browser: Mozilla Firefox 4.*

OS: Windows 7