Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. [code]for($i=2001; $i<date("Y"); $i++){   print '<option value="'.$i.'">'.$i.'</option>'; }[/code]
  2. It looks fine. \r\n is the equivalent to a new line. Why do you say it's not working? Can you show a live example, not just copy and paste text?
  3. "Alright I've repaired that but it's showing me the admin link when only logged in under staff. " Uhm, isn't that the point?
  4. require and include go by path, not url. What are the funky errors?
  5. It sounds like the include isn't working - try require() as it throws an error if it fails. Also, post the code where you're calling these functions.
  6. Store what question they're on in the session, then move onto the next one.
  7. Don't use a for loop, just display the one you want.
  8. Yes. You need to have session_start() at the top of every page.
  9. check out mootools.net and the ajax forum here.
  10. Where do they teach PHP at a university? I've never heard of that. I wish my uni had a PHP class.
  11. Don't delete rows, just mark a field as deleted, and don't show those. That way the data still exists.
  12. [quote author=ShogunWarrior link=topic=123523.msg510658#msg510658 date=1169486157] jesi, I see still have notices off. ;) [/quote] If it ain't broke, don't fix it.
  13. Put the message in a session variable and use it on the next page.
  14. [code] <?php $thirtyDays = 60*60*24*30; //If your date is stored as integer timestamp $renewal = $date-$thirtyDays; //If it's DATE/DATETIME $renewal = strtotime($date)-$thirtyDays; ?>[/code]
  15. "This is what I was attempting to use, to allow me to allow the person to go back to the previous page" Most browsers have a BACK button. That's what it's for. No reason to add that stuff in your site when it already exists...
  16. Maybe I misunderstood the question. Thanks Huggie
  17. <?php if($profile->Get_Gender() == 'male'){   $male = ' selected '; }else{   $female = ' selected '; } <select name="sel_Gender" class="style15" id="sel_Gender">   <option value="Male" <?=$male?>>Male</option>   <option value="Female" <?=$female?>>Female</option> </select>
  18. [quote author=redbullmarky link=topic=123503.msg510612#msg510612 date=1169482176] maybe at this stage it'd be better to follow obsidians advice and look through Smarty (as well as templates such as bTemplate, phpSavant, etc) to see how they work. [/quote] Or read the OS Commerce documentation, or check out their forum. Instead of looking at another template system which would just confuse you, I'd think it'd make more sense to read about the one you're using...
  19. That's what I would do. Think of the class as a blueprint. Every user has an age, gender, name - those should all be vars for it. var $age; var $gender; Plus, that's less for you to write. $this->age is cleaner than $this->row['age'], right? Redbull: you're right, they are valid but it doesn't follow what I've been taught about OOP design - so I'm just trying to explain how I've always done classes, the way my professors and boss showed me. I could be wrong. *shrug*
  20. Yes, but it's not really how the class should be designed. It would work.
×
×
  • 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.