Jump to content

jdock1

Members
  • Posts

    210
  • Joined

  • Last visited

    Never

Everything posted by jdock1

  1. LOL, I just had to add the PHP code to the top? And why do you say Im new to HTML? Lol... because I use deprecated code? I really dont care if its sloppy, as long as it works
  2. As I mentioned in my previous post, I am new to PHP Its not that im too lazy to read the PHP manual, its that there is SO much to it and wouldnt be able to find what I need Basically what I need is the "if" echo to be generated at the top of the page, rather than the bottom, where it is displaying now. Here is the code: <html> <head><title>Age Verification</title> <style type="text/css"> body { background-image: url('images/bg.png'); background-repeat: repeat } </style> </head> <body> <center><p><h2 style="color:#68C840 ">You must be atleast 116 years old to enter this site. Please verify your age below.</h2></p><br><br><br> <form action="index.php" method="get"> <p style="font-family:verdana;font-size:80%;color:#68C840">Name:</p><input type="text" style="background-color:#B8B8B8" name="name"> <br> <p style="font-family:verdana;font-size:80%;color:#68C840">Age:</p><input type="text" style="background-color:#B8B8B8" name="age" /> <br><br><br> <input type="submit" value="Submit" /> </form></center> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <center><p style="font-family:verdana;font-size:80%;color:#68C840"> DISCLAIMER: All models featured on this site are 100 years of age or older. We require all surfers of this site to be 116 years of age or older to access this site. </font></p></center> <?php $age = $_GET["age"]; $name = $_GET["name"]; if ($age > 168) { echo "<center><p style='color:#780000'>Congratulations, $name, you are old enough to enter this site. Now <h1 style='color:#780000'>GO FUCK YOURSELF</h1></p></center>"; } ?>
  3. I tried making a simple app for figuring out what the customers cash tendered was - the sale amount (I was bored, and figured my bro who owns his own business who sucks at math could use it) As I said in previous posts, I am a virgin to PHP and get all my knowledge from for dummies books and other php reference books The code seems valid to me, and I am not understanding why it isn't outputting what I want it to! Here is the code: <html> <head><title>SaleCulator</title></head> <body> <form action="calculated.php" method="get"> Sale Amount:<input type="text" name="SaleAmount" \> Cash Tender:<input type="text" name="cTender" \> <input type="submit" value="Calculate" /> </form> </body> </html> <?php $sa = $_GET["SaleAmount"]; $ct = $_GET["cTender"]; $dif = $ct - $sa; ?> & for the GET form code: <?php echo "$dif"; ?> Am I doing this entirely wrong?
  4. thanks dude ill try it, but what is the inc.dir? does it matter where it directs to? im so confuseddddd
  5. yes i installed it to my website http://www.cbhack.info/offer i dont have msn sorry
  6. lol dude i have no idea.. i dont no what i did wrong,, what should i do??
  7. ok im trying to install a script to my website but im so confused!!!!! idk what i did wrong, something with mysql please go to cbhack.info/offer, and please excuse the dirty language that is all a test lol, but its some kind of sql error. this is what i had to fill out which i think i screwed up <? define("SCRIPTNAME", "YourSite.com"); define("BASEHREF", "http://www.yoursite.com"); define("DOMAIN", "localhost"); define("FROMEMAIL", "admin@yoursite.com"); define("SITENAME", "YourSite.com"); define("INC_DIR", "/home/yoursite/public_html/inc/"); define("PAG_DIR", INC_DIR."pages/"); define("INC_DB", INC_DIR."db.php"); define("MYSQLUSER", "Yourmsql_Username"); // mysql username define("MYSQLPASS", "YourMysqlPass"); // mysql password define("MYSQLDB", "Mysqldb_Name"); // mysql database name require(INC_DB); ?> thats for the main.php for my script, am i supposed to put in my sql info in there? if so in which fields!? whats domain and basehref and inc_db!? somebody please helP!
×
×
  • 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.