Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. Maybe we could just have a big staff appreciation day. with cake....and hookers. ooh I can feel the appreciation already.
  2. the initial way should still work just fine.
  3. well you can still go ="cornholio" ?> If you like using short tags, then use them..... there's no point in conforming to religious PHP methods. Now, if you were creating this script for a business or client or whatever....then....I would recommend not using them. Some server administrators turn short tags off and that could hurt ....sales but as far as short tags go, I've always like them and I can't figure out why they're so "bad". I especially like them for use with $_SERVER['PHP_SELF']...when and if I ever use it. Well now that that's settled, you should continue with your initial topic.
  4. Well the question you have to ask yourself now....if you're interested in AJAX..is what do you want to trigger the refresh of the IP checks? Do you want to click a button to refesh them all...or wait 5 minutes, or hover the mouse over a sexy image of ellen page. It's all about what you want to happen. unless you specify as trigger of some sort....there's nowhere to go but to push F5 ever so often. EDIT a cool idea would be trigger it to refresh the IP whenever you hover over the IP itself....or name or whatever or ellen page... then you can just run you mouse about the screen updating like a madman
  5. just to save you from future headaches...... ------------------------------------------- create yourself another table....called cat (for categories) lay it out like this or something id | name --------------- 0 | general 1 | adult etc... etc.. etc.... then on your jokes table.....add another column to it called cat as well... and put the id for the type of joke it is.. so all the adult ones will be 1 for instance.... Then you can just go $sql1 = "SELECT * FROM jokes WHERE category=1 AND status=1; you don't select things from the result if you're just going to do another query....with a perfectly good SQL statement anyway. what I mean is, if you already have the id. there's no reason to select all the jokes and then select the id maybe I'm not sure of what you're trying to do, but whatever it is....it is much easier than you believe it is......I can sense it. explain a little more...if I have lead you wrong
  6. so you want a CONSTANT loop.....or a live feed type thing most likely the PINGs are going to be so instant that you won't be able to do them .....one at a time per say. It's already happening one at a time....it's just too fast for you to see
  7. is it so crucial that you use POST for this it would be much less of a pain for you if you just did this with GET you wouldn't even need a form.......of course I still don't understand what you need ENTER for..but still for instance and while you're at it....why do you need so many Ifs and elses for b.php you could just have a switch statement do all the work for you.....especially with the above method. switch($_GET['action']) { case 'add': //Do add stuff break; case 'del': //Do delete stuff break; case 'edit': break; case 'whatever': break; default: break; }
  8. I'm not the greating Apache person in the world but... just for gits and shiggles.... try putting this in your Apache http.conf file and see what happens AddType application/x-httpd-php .*
  9. try (COUNT(*)+1)+1
  10. above that line somewhere you are including this file functions.php that's where the output is. EDIT: my bad I overlooked the functions.php you posted up most likely you are getting an error in functions.php.....that is your output open that file up in a browser separately and see what happens also add this line to the top of it error_reporting(E_ALL|E_STRICT); another note why are you returning the function before you validate it? function checkformat($aUsername) { return TRUE; // if(eregi('^[a-z]+[.]+[a-z]+$',$aUsername)) return TRUE; else return FALSE; } function checkmailformat($aEmail) { return TRUE; if(eregi('^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+ $',$aEmail)) return TRUE; else return FALSE; }//end function function genpass() { $chars = "1234567890abcdefGHIJKLMNOPQRSTUVWxyzABCDEFghijklmnopqrstuvwXYZ1234567890"; $thepass = ''; for($i=0;$i { $thepass .= $chars{rand() % 39}; } return $thepass; } ?>
  11. Really, dabbling around in any kind of other language can help you improve ... rather drastically. all programming is is a bunch of jargon anyway. when I learned HTML for the first time....I was absolutely clueless. and I had no teacher to help me. nothing but homestead, geocities, angelfire...and I used hotspot.com for my searching back in them days. If I were to go back in time and mention PHP to myself or what it does...I wouldn't have a clue what to do with it. it wasn't until I learned what preprocessing actually meant that I could appreciate PHP. same concept with OOP. Fortunately for me....before I even heard the word OOP. I had taken a class in Java in a university I went to a few years back. They still didn't call it OOP, it was just they Java was coded. So by the time I passed my Java class and decided I came out with nothing on it anyway, I realized that PHP has a thing called OOP that looks really similar to Java's structure. So all in all, I can't say I'm a Java expert or anything....but if I didn't take that class.....I doubt I would know how to use OOP to this day. just have to say it one more tme....OOP
  12. Just remember that Google is your friend. He's like the really really smart kid in class with ALL the answers. All you have to do is ask him the right questions or you're getting nowhere. If you're really interested in Apache.....you'll have to come to realize what exactly a webserver is, if you don't already. download Apache, look for tutorials on WAMP (Windows Apache MySQL PHP) Servers. Actually there is a wampServer all-in-one download but I don't recommend using it if you really want to learn Apache. go down the hard road. If you have questions about what errors come up.......then just come back here and ask about it. pretty straight forward
  13. I know Zend has an encoder type thing that they offer but I've never used it. I always figured it would be a hassle to setup
  14. Also, next time don't double/triple post a question in multiple forums please.
  15. wouldn't this work in strtotime? strtotime("second tuesday in next month")
  16. you can always enter a regular date into the strtotime function $whatDayWillitBNextYear = date("l", strtotime("Sep 17 2009")); echo $whatDayWillitBNextYear; $whatDayWillitBNextYear = date("l", strtotime("09/17/2030")); echo $whatDayWillitBNextYear; $whatDayWillitBNextYear = date("l", strtotime("9 17 2010")); echo $whatDayWillitBNextYear; $whatDayWillitBNextYear = date("l", strtotime("September 17th 2042")); echo $whatDayWillitBNextYear;
  17. Well you've already ordered by phish .. descending...which is what you want all you need to do is put these results into an array and you'll be able to pull them out by number....or rank if you will. Just a modification of wildteens script Now the person who is ranked second will be here $row[1] and his score will be $row[1]['s_phish']
  18. put the or die extension on the mysql_query function rather than mysql_select_db if the db wasn't selected...mysql_query won't even work, so there's no reason to put an or die on the select db unless you really want to know why...which would most likely be a mispell or a bad permission. so.. try mysql_query("INSERT query blahblah blah") or die("ERROR: " . mysql_error());
  19. you could set a $_SESSION variable for the page. a simple true or false variable that is defined on the parent page..containing the iframe. and then on the iframe you'll probably have to check, destroy, etc the session and what not to keep someone from loading that php file later on.
  20. here are two excellent tutorials PHP on IIS 5.0 http://www.sitepoint.com/article/php-amp-mysql-1-installation/2/ PHP on IIS 6.0 http://www.visualwin.com/PHP-ISAPI/ It makes a difference in where all the options are. On 5, you just click a tab that says ISAPI filters and add PHP to it. On 6 you have to go to the extensions menu. EDIT: Also, I'm going to have to move this topic to PHP Installations.
  21. only advice I can muster up for facebookDev is learn JSON I signed up for the Facebook Development team too. I took a gander at their API and designing applications and what not. JSON is where it's at. At least that's my viewpoint so far. it wouldn't hurt to study jQuery as well. Facebook is loads and loads of AJAX, so if you can become a professional expert in JavaScript overnight...they'd probably hire you.
  22. there is a function called highlight_string that does exactly what you are looking for. a simple would make this
  23. We were on IPB for at least 2 years. From about 2004 to 2006. All the updates and everything ver 1 point whatever to 2 until....SMF like July of 2006 we finally got off of IPB And before all that we were on phpBB2!
×
×
  • 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.