Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by zppblood

  1. zppblood

    User Inputs!

  2. zppblood

    User Inputs!

    You can use regular expressions.
  3. $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($m), MCRYPT_DEV_RANDOM);
  4. Make sure you are assigning the variables for $name and $passwordhttp://us.php.net/manual/en/function.session-register.phpRead the warnings and notes.
  5. zppblood

    Some Php Help

    $_GET['id']Prints the value of 1345 on the screen. <?php echo $_GET['id'];?>
  6. It also works with XP Home Edition (that is the Windows version that I worked with on my computer). IIS (Microsoft) doesn't come with XP Home Edition though.
  7. setcookie("smchoppingcart",$value,time()+3600);You are setting smchoppingcart in two places in both the if and else. You might want to change smchoppingcart to smshoppingcart.
  8. In a coordinate system, x is left-right and y is up-down. I assume h is height and w is width, so h is up-down (Y) and w is left-right (X).I would say to divide the original picture's height and width (smaller_value/bigger_value), store it in a variable. Set a height and/or width that you want to be the maximum for the thumbnail, and then multiply the maximum number you set to the variable you set with the value of the height/width.
  9. zppblood

    Live Clock

    Use JavaScript with setTimeout().http://www.w3schools.com/htmldom/met_win_settimeout.asp
  10. If I remember from using freewebs years ago, they did allow you to use PHP, but had to pay for it.
  11. Justsomeguy posted the correct answer."If you're just sending a number that maps to an arbitrary file, then you need to keep a list of which numbers map to which filenames."Using an array or database.
  12. zppblood

    Php Queries

    Double quotes go through the process of converting variables/special characters into their values, where if you were to use single quotes, it wouldn't convert them and just print the string as is. <?php $var='4'; echo "$var"?>This would output 4 <?php $var='4'; echo '$var';?>This would output $var
  13. zppblood


    I don't have one, you have been here for a while, so I'm pretty sure you can actually make one yourself, it's shouldn't be too hard. You can use the empty function to check if the fields were filled out or regular expressions (you can use JavaScript as well, but always check it on the server-side) to check if the input is valid. If any of the fields weren't filled out how you wanted, then return them to that page with a message display at the top telling them what is wrong. I think probably the hardest part is to use CAPTCHA with the form if you were to add it.
  14. zppblood


    Make sure you have session_start() at the top. Set a value for the session $_SESSION['var']='somevalue'; then if you want to put that in a variable, just do it like you would normally.$somevar=$_SESSION['var'];
  15. You have a colon here<?php echo $name; ?>:To keep the information, you need to store it in either a file or database (this one is preferred). In your script, you are just outputting (displaying the text) the information the user submitted, and that is it. You are not saving the information. Continue on learning from the w3schools tutorials, reading the forum topics here and other tutorials, and visit the php.net page to learn about PHP and mysql.com to learn about MySQL relation database management system.
  16. Did you ever work on any .htaccess files, or perhaps messed with the Apache config file?
  17. He is talking about this libraryhttp://jquery.com/They are defining a function, the same way you would using $ instead of a name like someName(), if you wanted to create your function that isn't built-in. I also think that the $ is suppose to be a shorthand way of typing document.getElementsByTagName, getElementById, etc. with some other methods for it.
  18. Just know that when you use headers, it's not going to always be sending a user to a new page, though it might be what you do most of the time. <?php if($_GET['t']!=22) { header('Location: http://domain.com/?t=22'); exit; }?>
  19. Justsomeguy's first code needs to escape on " inside the string too.
  20. One problem with your code zachary, variable interpolation requires that the string starts with a " not a '. So change both ' that form the string, and change to " and escaping all of the other " backslashes like \".
  21. I can't help you on what you are wanting, but wanted to say that JavaScript and Java are two totally different programming languages.Maybe this site can help you outhttp://pipwerks.com/lab/swfobject/
  22. I just got one, but it was the only one so far.
  23. If you want an image changed when a page is refreshed, learn about Arrays, image properties, and random number generator.http://w3schools.com/js/js_obj_array.asphttp://www.w3schools.com/jsref/jsref_random.asphttp://www.w3schools.com/HTMLDOM/prop_img_src.asp
  24. zppblood


    You can download and install XAMPP or WAMP.http://www.apachefriends.org/en/xampp.htmlhttp://www.wampserver.com/en/
  • Create New...