Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Ah, I get it. hence the parabola. Thanks Is there any mathematical way to determine the positive value? Probably not...
  2. You do not need a space between table name and VALUES(), and I've never seen the syntax you're describing.
  3. Jessica

    CSS Arrow Help!

    Instead of having 8 images, combine them into one image just like the image you posted. Then if you need each arrow clickable, which why wouldn't you, put an image map on it.
  4. I don't get how that gives me x? I see on wolfram alpha the two alternate forms but neither gives you x when you know y I want to write a calculation in PHP that if I say I have 60 for y, it can tell me x = 4. Or y=100, and it tells me x = 5. And so on. If I give it 80 it should calculate for x and then round down to 4 but I can handle that part
  5. y = x*(x-1)*5; Given $y, calculate $x. I can get this far, it's been so long since I took a math class that I'm not even sure this makes sense. y/5 = x*(x+1) (y/5)/x = x+1 ((y/5)/x)-1 = x My problem is: Given $y = 60, how do I get $x = 4 (using php) 60 = x*(x-1)*5; 12 = x*(x-1); 12/x = x-1 (12/x)+1 = x And I'm stuck. (I know $x = 4 because I made a spreadsheet plugging in 1-100 as x and then getting y, so where x = 4 y = 60)
  6. Cookies enable users to stay logged in after they close their browser. Sessions do not. Cookies can be edited by a user. Cookies can be "grabbed" by another website and allow someone to spoof another user's account on your website. There are ways to protect against that, you should be able to find some info via google. A combination of both is best, but either one needs logic on your end to prevent problems.
  7. FYI, This is a very useless way to ask for help. Always describe what DOES happen. As for your code, you're not checking for any errors when querying. Look at the docs for examples. http://us.php.net/mysql_query (#2 is better than #1) I can see the error in your insert statement that is causing it to fail, but since you're not checking for errors you don't know that it even failed. I will say your descriptive variable names make it quite easy to spot. Last thing, once you get it working, read about sanitizing data.
  8. That's not how it works. {this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})} Is the part you need to edit. href and target are attributes of the a element, just like rel is.
  9. As long as php is installed OP, you can put those "private" files in a directory above the public web folder, and still include them. Then you can't even access it in the browser.
  10. If I understand you, the function to check if it's filled in needs to be called when the form is submitted.
  11. I've always used TextPad but just recently switched to jEdit for the SFTP support.
  12. That has absolutely nothing to do with this question - especially since the code in question is XML, not PHP. How are you importing the database? It looks as if you're giving it an XML file and it's expecting raw sql.
  13. You haven't explained what you want. If you want text to disappear regardless of what action the user takes, don't display it in the first place.
  14. I think you mean to ask "Did you write this code" which is bound to elicit a "No".
  15. var State = Country[value][value]; What the heck is that line doing?
  16. Jessica

    CSS Arrow Help!

    It would be a lot easier to have 1 image and do an image map.
  17. You should be able to do a float with a clearing element after it, to make the parent div have the correct height. <br style="clear: both" /> after your floated elements.
  18. it's going to be in header or menu or something. page is for the content. Look at all of the files in the template.
  19. $smarty->assign('contacts', Contact::getContacts(intval($cookie->id_lang))); Is the line in the php file that gets the contacts you can select from (which is the subject drop down). If it's not in the config file as PFM suggests, it's probably in a table in your DB.
  20. phpMyAdmin is what comes with WAMP, so I use it because it's there I will look into the tool you suggested though. I was trying to get a small project quickly set up, so Wamp Server as it comes was easiest. Now that it's set up I have time to play around with settings and other tools. Thanks!!
  21. I didn't, thanks. I am having some serious issues with this. *headdesk*.
  22. I think you should read some more tutorials/lessons on mysql if you can't figure out what that does.
  23. I switched back to the newest version, found where to turn off all the ajax in the settings, but I can't get the settings to be permanent. According to the docs I need to run the create tables script, which I did, and then add the db and table to the config.inc.php, which I did. http://localhost/phpmyadmin/Documentation.html#linked-tables $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig'; I restarted WAMP but it still says "Your preferences will be saved for current session only. Storing them permanently requires phpMyAdmin configuration storage." Anyone know what I'm missing?
  24. eval worked perfectly to do it in the autoloader. <?php function autoload($className) { if(file_exists($className.'.class.php')){ require_once($className.'.class.php'); }else{ $dynamicClass = "class $className extends O{}"; eval($dynamicClass); } } ?> And yes, this is a very temporary thing. I'm doing it in the autoloader because otherwise if I'm doing to take the time to define the name of the class before trying to load it, I might as well take the time to make the 1 line file which would then be autoloaded. It is possible, just needed to use eval(); Much thanks!!
  25. Duh, eval()!! Thank you! Not at the desk anymore but I will try that as soon as I get back.
×
×
  • 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.