Jump to content

MrAdam

Members
  • Posts

    489
  • Joined

  • Last visited

Posts posted by MrAdam

  1. for the popup to contain the username etc. I imagine you'll either need to set it on page load, or use AJAX.the popup window would be fairly simple to create. There's an article on the javascript forum about centering a div; width and height. Then just use javascript timing to remove the popup after a number of seconds.

  2. do you mean like, templated pages using includes?my way of doing it is to create a file called "templates.php" or something. have a few functions within it, mainly "writeHeader($title)" and "writeFooter()". The variable $title obviouslly to change the title of the page.then include templates.php, and run the functions where i want them.

  3. I know how to use cookies - i think the problem is that the sessions simply won't last a day without having access to the php.ini file. I think the best way to do it would be to save their session data in a database. if anyone thinks otherwise though, please le'me know !-cheerrs!

  4. Umm, i'd say you'd have the user in the database, then when they login a field in the database changes to "online". Then next time the users refresh (or you periodically update their contact list or w/e) they see the user as online.

  5. i think it depends on the configuration of sessions. what i want is so that people can do stuff on the webpage with their session; exit the browser; upto a day later return to the website and it have saved their session. So anything they add to the shopping cart for example, will still be there up to a day later ..

  6. $update = mysql_query("Update studios set tour = '$tour', studio = '$studio', address = '$address' where id = '$_GET[edit]'");

    try that .. There was a comma after "address = '$address' "

  7. if you want to simply, compare the two to ensure you have the right person: save the IP in the database, when they register or something, then use a select statment to verify it's the same.you can then save that in a session - and as the user cannot modify the sessions themselves, it's secure enough to compare in the future - saving time.

  8. yeah .. im creating a web site for my boss, for his company. at the moment he has all his stock saved in an excel document - what i was hoping to do was to allow him to change the stock on the excel document.. which i could then write a script to apply the changes to the database.

  9. i managed to sort it:

    $id = "72"; // usually i would have run some statements to be left with the array[x] matching my id$test = Array();$test[0] = "72,72,72";$len = strlen($id) + 1; // length of ID plus 1 more for the comma$rem = strlen($test[0]) - $len; // the remainder from length of the array[x] minus $len$test[0] = substr($test[0],$len,$rem); // use substr() to only select after the first id, effectivelly, only removing one of the IDs

  10. hey all!i've been on with this for past half hour, and im a bit frustrated now!i have a variable which contains an id. In some cases the id may be repeated (multiple times), and a comma inbetween the id's. for example: "33" OR "33,33" OR "33,33,33" etc.im trying to create a simple function to remove just one of the id's: so, "33,33" becomes "33".my question is; how do I do it ?! :) -Thanks!

×
×
  • Create New...