Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. How many functions do you wish to bind to your element? if it's going to be like an on/off switch you might be better of with a boolean inside one function.
  2. http://www.phpfreaks.com/forums/index.php/topic,263296.0.html I agree it doesn't seem to have changed at all actually. Gives me the impression that you're just advertising rather then using the critique
  3. yup first remove the old event then add another. Other then that you can add multiple events to an element
  4. I'm just going to assume you're using jQuery since it does look that way. // remove the event from the link $('#refresh').unbind('click', refresh); // add new event $('#refresh').bind('click', getSorted()); http://docs.jquery.com/Events/unbind#type
  5. Hmmm re-reading the way you had written the first array It awfully looks a lot like a database record. If this is so you're better of using a query instead of doing it with PHP. If it's just a multidimentional array then you should use a a double loop checking for all the fields.
  6. Just too late for the edit I see. Take a look at strstr and strstr instead of regex
  7. You could use a loop to go through all entries and store the found match in a variable. You could use a regular expression to check if a value is in it. something like: <?php $search = "M110"; $match; foreach($arr as $item){ if(your_regex_func($search,$item)){ $match = $item; break; } } edit needed the search param too other then that strstr and stristr are probably better for this then a regex
  8. What results have you gotten what have you tried? Will these url's be on the same domain or a different one? And what serverside languages do you have? Is there a reason you want to use ajax? Just HTML won't get you far do you have a basic understanding of any programming language?
  9. In order to put a form value inside a session the form has to be submitted. Either that or use ajax
  10. If it's a session var then use $_SESSION If you just want to pass a form value use $_POST or $_GET depending on the method
  11. Easy don't install xampp it sucks under Linux. Install Apache, PHP and Mysql using a terminal or adept instead it is easy enough.
  12. PHP is also written in C But anyway C/C++ are lower level programming languages. It's closer at hardware level. OOP in C++ can be a bit confusing (at least it was to me) at first since you don't encapsulate the methods in the class like PHP and Java. If you're only familiar with PHP, working with pointers will be completely new to you. This is were you can screw up big time because you can create memory leaks if you don't use pointers correctly.
  13. It's not as simple as that. A button doesn't delete records a query does. I advice you to not mix your logic with your html try to separate those. To be honest I would start over again your code is a mess. Also I don't see $_POST, $_GET or $_REQUEST anywhere in your code you are not using register globals are you?
  14. Seems you temporarily want to store a value without submitting a form. You could use a cookie for this. If you really want to use a session then look into ajax
  15. Uh you can't convert that to jquery in that way. I'm guessing you want to check what form values are available for posting. You should prob take a look at the selectors
  16. Sounds like an ajax thing. But anyway escape() is certainly not the same as urlencode(). Why don't do a simple test containing the & character or send some text containing %20 or something like that. See if something goes wrong on your serverside script. Other then that using urlencode will only really matter if your planning to use the get method even you're using a post method instead you don't really have to bother with it.
  17. Before you can delete something from a database there should be something in it. Do you have that part? Other then that in your title description you mention you want to delete rows, but now your asking to delete queries? I think you had it right the first time.
  18. Sounds like a basic CRUD app but what is your question?
  19. What do you mean with that sentence? This is where you write a delete query which deletes records older then 10 minutes.
  20. What exactly do you mean with "it appears visually"? Does it show a new input field when you're appending html code of a field to innerHTML. Could you post the code that you're using to create the a new field? Another note, once you submit your form the text fields you create using javascript won't be rebuild on the form unless you've handle this serverside somehow.
  21. You do realize that there is no where condition for an INSERT right? http://dev.mysql.com/doc/refman/5.1/en/insert.html If you want to insert a new record leave out the where Perhaps you meant an update query?
  22. Try and echo out your sql and see what the complete query looks like echo $sql4;
  23. No PS3 here either just a PC and xbox360, As for genres I like : FPS, Sandbox and classic games such as Kyrandia, Space Quest, Full Throttle, Commander Keen etc.
×
×
  • 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.