Jump to content

alphanumetrix

Members
  • Posts

    167
  • Joined

  • Last visited

Everything posted by alphanumetrix

  1. No it is not! Yes, it is. Look it up. PHP is an Object-Oriented Programming language (OOP). Quick reference: http://en.wikipedia.org/wiki/Object-oriented_programming_language
  2. What does OOP stand for then? Is it basically just CMS?
  3. OOP means object-oriented-programming. PHP is OOP, no matter how you use it. So when you talk about using OOP with PHP, it sounds stupid. It's like double OOP, which makes no sense. Am I missing something here?
  4. Google should render both fine; however, depending on how BAD your HTML is, the GoogleBot can throw your script out. If there is no way for the GoogleBot to read it, there is no way for it to read it... it's simple. XHTML will always be read clearly by the GoogleBot, so I would say just go with that. As a general rule, you should always go with XHTML (unless you're sending e-mails or something).
  5. this should work: $string = 'whatever is something'; $pattern = '/something/'; $replacement = '<a href="#">something</a>'; $go = preg_replace($pattern, $replacement, $string); echo $go; that should replace "something" with "<a href="#">something</a>"
  6. don't feel like explaining how to do that, but to keep all the user id's unique is simple. all you have to do is set the field to autoincrement, and you won't ever have to worry about them doubling up.
  7. A lot of pearl features you don't even have to call from directories on some servers. IE: if I were to call Pearl's SMTP Mail - I would write: <?php include("Mail.php"); ?> That automatically pulls it from /us/bin/pear/ or whatever the directory is.
  8. target=" is used for links. IE: <a href="#" target="_blank">whatever link</a> src=" is used for different things, but mostly images. IE: <img src="http://mysite.com/myimage.jpg" width="100" height="100" alt="my image" />
  9. Oh, I see now. Why are you using javascript on such a basic page? Why not just query it through PHP?
  10. Oh, just read your post, and the other posts. The guy a few posts above me is right. A MySQL query shouldn't slow your site down at all (in fact, it was designed to be really fast). If it is slowing it down, it's probably coded wrong. My guess is you have an unnecessary, perhaps accidental infinite-loop in there somehow (php error, not mysql). Maybe post your code in the PHP help section for help.
  11. pretty good layout of your elements. ultimately, the LAYOUT of the site isn't bad at all. Having said that, your style could use a lot of work. Don't know if you use CSS, but if you don't I recommend you do, and if you do, I recommend you change your colors. First, I'd start with making it more streamline - probably by making the background area black, and adding light, gray-ish borders around your layout elements. After that, I'd make the font a little small in areas and easier to read. Also, I'd change the colors of them, too - probably make the main font a light-gray, and making the headings yellow and/or blue. I'd change your banner/logo, and maybe drop the yellow boxes containing the headings of your elements (IE: Navigate the Site) - perhaps just use a large blue or yellow font for them, and add an underline to the text (probably float text to left though - not centered). Also change your general headings to float left. I'd change your menu to match the rest of the site better, too. You may have over done it with the boxes. Simple links would probably look much better. The last thing I'd probably change is the blurry image (i'm assuming of the judo team). I'd take a clearer one, and optimize it with photoshop if possible. PS: I like the gray-ish gradients you used for the side menus. It would go really well with what I said above. Oh, and one more thing. The site takes a REALLY long time to load (much, much, much too long for a site as simple as that one). I don't know what you did, but something is really bogging it down (I presume it's a coding problem - or perhaps you have a HUGE image in there somewhere behind the site...). Try validating your HTML, and if you use it, your CSS, too. I didn't bother to, but I'm guessing you'll find some errors if you hadn't already. -- sorry if I went a little over the top. I haven't done a site design in a while, so I'm just a little antsy. :-\
  12. You may not have the PHP mail() function enabled on your server. A lot of people have this problem. As an alternative, you can use PHP Pearl's Mail via SMTP. If you have SMTP, e-mail me for more info: info@akatsukidesigns.com
  13. simple. if you don't want an error, try this: if (!empty($yourfilevar)) { // your code to execute... } if you want to display your own error, do this: if (!empty($yourfilevar)) { // your code to execute... } else { echo 'There was no file.'; }
  14. i tried some basic injection methods. it seems pretty secure.
  15. I see a reason. This is a bad code: <LINK REL="stylesheet" TYPE="text/css" HREF="style.css"> Try this: <link rel="stylesheet" href="style.css" type="text/css" /> also check to make sure your css is linked properly, and there's actually valid codes inside it.
  16. no, probably not, but apple.com/safari - somewhere on there you can find a developer community that will give you information about how safari renders session cookies.
  17. instead of using GET to send the data to flash, why don't you use POST or loadvarsnum from a file? use a php code such as this: $results=array(); $sql="SELECT * FROM `".$tablename."` WHERE `id`=".$_REQUEST[id]." LIMIT 1"; $result = mysql_query($sql, $link) or die('Error: ' . mysql_error()); while($a_row = mysql_fetch_array($result, MYSQL_ASSOC)) array_push($results, $a_row); if(count($results)){ echo('&myVar='.$results[0][field_name1]); }else{ echo('Sorry - no result found'); } that should display: &myVar=whateveryouwant - then you can just call that data from the PHP file, using loadVarsNum in Flash. I don't remember exactly how to write it, as I haven't coded AS in a while. This, or something very similar to this, should work though: loadVarsNumb("myfile.php","1"); if (myVar.1level == 'whatever') { // do something } sorry about the sloppiness of that. I just can't remember how to write it. I'm %99 percent sure it's not supposed to have .1level, but it is supposed to call the level somehow. If I was at home, I'd just look at my old work and show you, but unfortunately I am not. In anycase, you just load it, and then call it from the level. (maybe using X or something) Anyway, hope this helps.
  18. flock would be a good idea. instead of a txt file though, why don't you just use a database?
  19. becareful with passing variables through URL; especially when using $_GET - it can make your script vulnerable.
  20. The problem is simple. You forgot to close it. This will work: $result = mysql_query("Select * From login_table where user_name='$username'"); You forgot to finish the statement with "); instead, you just inded it with ';
  21. what do the scripts do? if you're trying to execute something, you might be able to set them up in an array, and execute it all at once.
  22. i can do it for you. send me an email: info@akatsukidesigns.com
  23. not sure what you're trying to do. why do you need a loop?
  24. Not sure what you're trying to do with this: /* Quick self-redirect to avoid resending data on refresh */ echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[php_SELF]\">"; return; if you're trying to redirect someone using that, it probably won't work. However, this will: <?php header("Location: http://yourpage.com"); ?>
  25. Are you trying to create a loop? If so, try the foreach function.
×
×
  • 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.