Jump to content

hcdarkmage

Members
  • Posts

    326
  • Joined

  • Last visited

About hcdarkmage

  • Birthday 07/31/1977

Contact Methods

  • MSN
    heavyarms25@hotmail.com

Profile Information

  • Gender
    Male
  • Location
    St. George, UT

hcdarkmage's Achievements

Member

Member (2/5)

0

Reputation

  1. You could do something like this: if($_POST['submit']{ //get your form data foreach($_POST as $key=>$value){ $$key = $value; } //set a default $errors = false; //form validate if(!fname){ $errors = true; $errormessage = "Your message"; } //if no errors, send information if($errors == false){ //Information things } } Then, somewhere above your form you put echo $errormessage;
  2. First off, you need to move the if(!fname) into the if($_POST['submit']). if ($_POST['submit']) { //Get form data $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; $displayemail = $_POST['displayemail']; $phone = $_POST['phone']; $category = $_POST['category']; $description = $_POST['description']; //Begin validation if (!$fname){ $errorstring = $errorstring."First Name<br>"; } //Declare variables $to = "email@gmail.com"; $subject = "Request"; $headers = "From: $email \r\n Reply-To: $email"; } //Setup form validation $errorstring = "" //default value of error string The reason it wasn't working was because you were not declaring $fname anyhwere except in the $_POST.
  3. First off, I can see there is no starting <table> tag, just the ending tag. Scond you may want to try something like this: while ($item_info = mysql_fetch_array($get_item_sql)) { $item_id = $item_info['item_id']; $item_artist = $item_info['artist']; $item_photo = $item_info['thumb']; $item_username = $item_info['username']; $item_title = $item_info['title']; $item_name = $item_info['name']; $image_row = "<tr height=\"200\"><td ><img src=\"image_files/{$item_photo}\" alt=\"{$item_name}\" /></td></tr>"; $image_row .= "<tr><td align=\"center\">{$item_title}</td></tr>"; } then use your </table> tag
  4. I think what mjdamoto was getting at was, "please show the whole loop so we can help you fix it." You are just throwing the same code at us. What you did didn't change anything because you just reworded the same code to act exactly the same as the first code you showed us.
  5. Try: include ('profile-success.php?username='.$username); Of course, I am not sure if you can even add things to an include like that.
  6. Try to do it this way: $dir = "/oauth/files/".$decrypted_username; scandir($dir); Makes me wonder if it doesn't like the break up of the string.
  7. Here, I hope this helps: if(isset($_COOKIE['LOGIN'])) { $key = 'MY_WORKING_KEY_WHICH_DOES_WORK'; $string = $_COOKIE['LOGIN']; $decrypted_username = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5(md5($key))), "\0"); include("/oauth/accounts/".$decrypted_username.".html"); echo "<script type=\"text/javascript\"> <!-- if (self != top){ top.location.href = self.location;href; } //--></script>"; } if(isset($_GET['browse'])){ $key = 'MY_WORKING_KEY WHICH DOES WORK'; $string = $_COOKIE['LOGIN']; $decrypted_username = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5(md5($key))), "\0"); scandir("/oauth/files/".$decrypted_username); echo "To upload new files, click <a href=\"account.php?upload\">here</a>."; }else{ header('Location: /login.html'); } exit;
  8. Two more lines to fix: include("/oauth/accounts/".$decrypted_username.".html"); and scandir("/oauth/files/".$decrypted_username); Try that. Also remember to clear your cookies before you test it again. Doing a refresh doesn't always clear that.
  9. This line: if(isset($_GET['browse'])); should be if(isset($_GET['browse'])) //<--NOTICE: No ;
  10. This may help: https://www.x.com/community/ppx/documentation. It has all the documentation you need for implementing PayPal into your site.
  11. I hate to ask this, but have you gone through the PayPal documentation on how to use their APIs? The documentation will tell you what values to pass to PayPal and how you can retrieve them WITHOUT the user bypassing the whole thing. You can set up a specialized variable (like a customer id) that you send to PayPal and they will send that variable back to you, if you request it. Just go through the documentation that PayPal has.
  12. $gallery = urldecode($_GET['gallery']); echo htmlentities($gallery);
  13. Dang it . . . beaten to it. PFMaBiSmAd is right.
  14. Try it without the "" around the variables: mysql_connect($host, $user, $pwd) or die("Computer say NO!"); mysql_select_db("test_site") or die("I've just had a senior moment, and cannot connect to the database...");
×
×
  • 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.