Jump to content

soccer022483

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

soccer022483's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm creating a classified ads system online. Here's my problem: When someone creates a new ad, they can upload an image. If they upload an image, but end up not creating the ad, I need to delete the image. Do you think this is the best way to do it?
  2. That's an interesting idea. But should I alert the user that what they entered in invalid, or just strip the tags without them knowing.
  3. Try changing your form to method = 'GET' and make sure your variables are in the address bar correctly.
  4. Here is the form: [code] <form action="another_page.php" method="get">     <input type="radio" name="gender" value="male" /> Male     <input type="radio" name="gender" value="female" /> Female     <input type="submit" name="submit" value="Go" /> </form> [/code] When you click 'Go' on this form, it will take you to 'another_page.php'. On this page you need to make sure they arrived from that form by doing this: [code] if(isset($_GET['submit'])) {     //I'll explain what goes here in a minute } else {     //an error message here } [/code] Now, once we're in the if statement, we need to get the gender. (check the post before mine) [code] $gender = $_GET['gender']; //whatever you want to do with $gender here [/code] I have used GET instead of POST here. This way you can see the variables in the address bar in your browser. I like to use GETs until I have everything working right, then change everything to POST so the user doesn't see the variables.
  5. how about [code] if(isset($_SESSION['user1']) && $_SESSION[user1_account_type] == 1) {      //page output } else {      require_once 'lerr.php'; } [/code] I'm assuming if user1 is logged in, you set $_SESSION[user1] equal to true or something, otherwise you don't set it to anything. I'm not sure if I answered you correctly or not.
  6. I have a comment textarea on a form. To validate it i'm going to use php regular expressions. Anyone know a good reg exp to use? Or what characters should I allow/not allow? The only one I was thinking would cause problems is "<" and ">". That would prevent html and php and others. Your comments/suggestions?
×
×
  • 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.