Jump to content

hcdarkmage

Members
  • Posts

    326
  • Joined

  • Last visited

Everything posted by hcdarkmage

  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...");
  15. Here is a pre-written script you might like: http://www.javascriptkit.com/script/cut183.shtml.
  16. Just a quick suggestion. If your articles are being pulled from a database, you could set it up so that there is a "picID" field, or what ever you use for getting the random pick, then run an IF . . . ELSE statement. The IF/ELSE statement could check to see if an image is already set to an article, set it if it is not and it should keep the picture with the article.
  17. Some code would help us figure out where you are going wrong.
  18. Okay; try this: $url = (!empty($_SERVER['HTTPS'])) ? "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; That will get the current url, then you can use this: $url = $url."&var2=another";
  19. I hate to ask, but what do you mean by add some later? You mean after you process the first link? Or are you talking about adding things while it is being redirected?
  20. For one thing, your session_start() should be right after the opening php tag.
  21. If you where going to do it through headers then it would be like: header("Location: http://www.example.com/index.php?var1=var1&var2=var2&var3=var3"); Same would be for a link: <a href="http://www.example.com/index.php?var1=var1&var2=var2&var3=var3">Click here</a> EDIT: Don't forget to use the $_GET variables on the link page. $var1 = $_GET['var1']; //etc.
  22. Never mind. I think I just figured it out. It is because I am outputiing "Test Mode" Before the doctype that is screwing it up. How stupid is IE?
  23. And it's the truth, too. I have a site that I am working on that looks great in FireFox (no surprise there), but in IE my div placement goes funny. But, the sad thing is, it is only on pages that have PHP code at the top of the page. If anyone can help me out, I woiuld be very thankful. The website, if you want to see what I'm talking about, is http://juvenizecomplex.com/index.php. In IE the first page is messed up, but if you go to testimonials.php, you will see that it works fine. index.php <?php session_start(); ////////////////Remove When Done testing//////////////// $_GET["test"]="true"; ///////////////////////////////////// if ($_GET["test"]=="true") { include_once("/home/www-data/landing_pages/configtest.php"); $_SESSION["test"]= true; if (!$_GET["id"]) $_SESSION["page_id"]=$page_id=25; else $_SESSION["page_id"]=$page_id=$_GET["id"]; echo "Test Mode"; } else { include_once("/home/www-data/landing_pages/config.php"); $_SESSION["test"]= false; if (!$_GET[id]) $_SESSION["page_id"]=$page_id=25; else $_SESSION["page_id"]=$page_id=$_GET["id"]; } include_once('/home/www-data/landing_pages/securemoneyonline_com/class/class.track.php'); $oTrack = new track(); $sql = "SELECT product_id,source_id FROM leads_page WHERE page_id =".$page_id; $result = DatabaseHandler::GetRow($sql); $_SESSION["product_id"] = $product_id =$result["product_id"]; $sql="SELECT name,billing_amount,initial_amount ,billing_cycle,product_groups_id FROM products WHERE product_id =$product_id AND active = 1"; $productinfo = DatabaseHandler::GetRow($sql); $_SESSION["source_id"]=$result["source_id"]; $_SESSION["reduced"]=0; $_SESSION["initial_amount_reduced"]=0; $_SESSION["product_group_id"]=$productinfo["product_groups_id"]; if (!$_SESSION["hit_id"]) { if ($_REQUEST["affiliate_id"]) $affiliate_id=$_REQUEST["affiliate_id"]; else $affiliate_id=0; $_SESSION["hit_id"] = $oTrack -> putleadform2($affiliate_id,$page_id,$product_id,$_SERVER['REMOTE_ADDR']); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Juvenize</title> <link href="css/style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="header"></div> <div id="Menu"> <div class="menuBtn"><a href="index.php" class="links2" style="text-decoration:none" >Home</a></div> <div class="menuBtn"><a href="testimonials.php" class="links2" style="text-decoration:none" >Testimonials</a></div> <div class="menuBtn"><a href="order.php" class="links2" style="text-decoration:none" >Order</a></div> <div class="menuBtn"><a href="faq.php" class="links2" style="text-decoration:none" >FAQ's</a></div> <div class="menuBtn"><a href="about.php" class="links2" style="text-decoration:none" >About</a></div> <div class="menuBtn"><a href="terms.php" target="_blank" class="links2" style="text-decoration:none" >Terms & Conditions</a></div> </div> <div class="spacer"> </div> <div id="order"> <div id="logoFinish"></div> <div id="flash"> <object width="800" height="345"> <param name="movie" value="img/juvenizemain2.swf"> <embed src="img/juvenizemain2.swf" width="800" height="345"> </embed> </object> </div> <div id="salesText"> <img src="img/menubar.png" alt="" width="100%" /><br /> <div class="left"> <p>Juvenize's anti-aging formula combines several active ingredients that accomplish the optimum effect in reducing wrinkles. Within the first 15 minutes of application, you can feel the tightening and observe the exfoliate effect, giving you a more youthful appearance.</p><br /> <p>All you have to do is apply twice a day, once in the morning and once in the evening after washing your face, and within 10-15 days of use the long-term effects will be noticed and will remain with continued use.</p><br /> <p>Why pay over $100 per ounce on a product that pales in comparison? We have over 30 years of experience formulating and designing skin care products that works better and costs less then the leading competition.</p> </div> <div class="right"> <img src="img/product.png" alt="" width="175px" /><br /> <p class="disclaimer">Product packaging subject to change.</p> </div> <div class="spacer" style="clear:both;"> </div> <img src="img/menubar.png" alt="" width="100%" /> </div> </div> <div class="spacer"> </div> <div class="advert"><a href="http://voucherblitz.com" target="_blank"><img src="img/vbad.png" alt="Visit VoucherBlitz.com" /></a></div> <div class="spacer"> </div> <div class="footer"> Copyright © 2010 Juvenize Complex. All Rights Reserved.<br /> <a href="terms.php" target="_blank">Terms and Conditions</a> | <a href="privacy.php" target="_blank">Privacy Policy</a> </div> </div> </body> </html> testimonials.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Juvenize</title> <link href="css/style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="header"></div> <div id="Menu"> <div class="menuBtn"><a href="index.php" class="links2" style="text-decoration:none" >Home</a></div> <div class="menuBtn"><a href="testimonials.php" class="links2" style="text-decoration:none" >Testimonials</a></div> <div class="menuBtn"><a href="order.php" class="links2" style="text-decoration:none" >Order</a></div> <div class="menuBtn"><a href="faq.php" class="links2" style="text-decoration:none" >FAQ's</a></div> <div class="menuBtn"><a href="about.php" class="links2" style="text-decoration:none" >About</a></div> <div class="menuBtn"><a href="terms.php" target="_blank" class="links2" style="text-decoration:none" >Terms & Conditions</a></div> </div> <div class="spacer"> </div> <div id="order"> <div id="logoFinish"></div> <div id="mainHeader">Testimonials</div> <div id="formInfo"> <p>I just wanted to say "Thank You So Much" for finally making an Anti Aging Cream that works! I put it on and could tell right away that it was tightening my skin. It's been over a month now and it is really working for me. My skin looks clearer and better than it has sense I was 20. Now that I have been using it for 30 days the results are incredible. I am 45 and when friends see me they think I am 10 years younger.. You are the greatest!<br /> <b>Janet</b><br /> <font size="2"><b>Salt Lake City, UT</b></font><br /><br /></p> <p>What an exceptional product, I have used many different anti aging creams but this is the first that has done everything it claimed. What a pleasant surprise. <br /> <b>Wendy</b><br /> <font size="2"><b>Idaho Falls, ID</b></font><br /><br /></p> <p><font size="2">*Testimonials are not representative of everyone's experience and only provides information about the individual's experience as to the point in time when they are provided. All testimonials are authentic and accurate. Testimonials may be edited for clarity or brevity. All claims have been documented and verified for accuracy. No one has been paid to share these stories here. Individual results will vary.</font> </p> </div> <div class="spacer"> </div> </div> <div class="spacer"> </div> <div class="footer"> Copyright © 2010 Juvenize Complex. All Rights Reserved.<br /> <a href="terms.php" target="_blank">Terms and Conditions</a> | <a href="privacy.php" target="_blank">Privacy Policy</a> </div> </div> </body> </html> style.css @charset "UTF-8"; /* CSS Document */ *{margin:0px; padding:0px;} body { background-color:#fff; } #Menu { height:24px; width:850px; margin-left:5px; margin-top:7px; } #header { background:url(../img/jlogo4.png); background-repeat:no-repeat; height:52px; width:255px; float:left; margin-left: 1px; } #container { width:950px; height:800px; background-color:#fff; background-repeat:no-repeat; margin-right:auto; margin-left:auto; padding-top:5px; margin-top:10px; } #container2 { width:950px; height:400px; background-color:#fff; background-repeat:no-repeat; margin-right:auto; margin-left:auto; padding-top:5px; margin-top:10px; } #flash { float: right; width:800px; height:345px; margin-left:0px; margin-top:0px; margin-right: 20px; } #order { width:911px; margin-top:7px; border-style:inset; border-width:thin; border-color:#2d6438; } #logoFinish { float: left; background: url(../img/leaf.png) no-repeat; width: 58px; height: 73px; } #salesText { clear: both; width: 911px; font-family: Arial, Helvetica, sans-serif; color: #000000; margin-top: 10px; font-size: 14px; } #mainHeader { float: right; background: #8dc73f; width: 800px; height: 25px; color: #056839; font-size: 20px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; text-align: center; vertical-align: middle; margin-top: 30px; margin-right: 20px; } #formInfo { clear: both; width: 800px; font-family: Arial, Helvetica, sans-serif; margin-left: 90px; } .left { float: left; width: 600px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: justify; } .right { float: right; width: 225px; padding-left: 10px; padding-right: 10px; padding-top: 10px; } .topicHead { width: 100%; vertical-align: middle; text-align: center; font-size: 18px; color: #000; } .formInfo { font-size: 14px; font-weight: bold; color: #000; width: 100%; } .odd { background: #d4d4d4; width: 100%; height: 30px; vertical-align: middle; } .even { background: #FFFFFF; width: 100%; height: 30px; vertical-align: middle; } .odd td { padding-left: 10px; } .even td { padding-left: 10px; } #addContainer { width:900px; height:100px; margin-top:5px; } .spacer { width:900px; height:13px; } .box { height:100px; width:265px; border-style:inset; border-width:thin; float:left; text-align:center; font-style:italic; font-family:"MS Serif", "New York", serif; font-size:24px; color:#2d6438; } .menuBtn { margin-top:28px; margin-left:0px; float:left; text-align:left; font-family:"MS Serif", "New York", serif; font-size:15px; color:#2D6438; padding-left:8px; text-decoration:none; } a.links2 { color:#2D6438;; } a.links2:hover { color:#98c245; } #slideshow { position:relative; height:450px; } #slideshow IMG { position:absolute; top:0; left:0; z-index:8; opacity:0.0; } #slideshow IMG.active { z-index:10; opacity:1.0; } #slideshow IMG.last-active { z-index:9; } .footer { font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 11px; text-align: center; width: 911px; } .footer a { text-decoration: none; color: #056839; } .footer a:hover { text-decoration: underline; color: #8dc73f; } .disclaimer { font-size: 11px; font-weight: bold; text-align: center; } .fieldname { width:40%; text-align:right; } .advert { width: 800x; height: 70px; margin-left: 65px; } .advert a { text-decoration: none; cursor: hand; } .advert a:hover { text-decoration: none; cursor: hand; } .advert img { border: none; } I know they aren't pretty, but they're what I got. Any help would be appreciated.
  24. <?php copy($_FILES['banner']['tmp_name']['file'], './banners/'.$photo_id $ext.'); ?> <a href="<?php echo safe_output($photo['web_url']); ?>" target="_blank" class="bannerImg"><img src="banners/<?php echo $photo['id']$ext; ?>"/></a>
×
×
  • 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.