Jump to content

silentg0d

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Everything posted by silentg0d

  1. This wont be easy to say so i will have to explain what my code does first let me give you my code. http://pastebin.parentnode.org/4704 Ok There is something wrong with the strings $HeadPiece = $Headx; $ChestPiece = $Chestx; $ArmPiece = $Armx; $LegPiece = $Legsx; $FeetPiece = $Feetx; This code sends a message to my email from a form which looks like so {$Profession} {$SetName} Head=$HeadPiece; Chest=$ChestPiece; Arms=$ArmPiece; Legs=$LegPiece; Feet=$FeetPiece; To get $HeadPiece, $ChestPiece, $ArmPiece, $LegPiece, $FeetPiece The people using the form need to input a hex code in the form, i then use a list to take certain variables out of the hex code and put them into the correct variables. But when i send the email it looks like this {$Profession} {$SetName} Head=; Chest=; Arms=; Legs=; Feet=; any idea what i did wrong, im new to php this was my second project
  2. Hey i'm getting an error on line 24 i think i defined the string wrong? http://pastebin.parentnode.org/4696
  3. None of this has worked, any other ideas? i could give you the full code so you could test it for yourself, it will email it just change the email to what you want it to send to. <html> <head> <title>GWLP - Emulation Dev</title> </head> <body> <br> <br> <br> <br> <br> <?php if (isset($_POST['Profession'])) //if "email" is filled out, send email { //send email $Profession = $_POST['Profession']; $SetName = $_POST['SetName']; $HeadPiece = $_POST['HeadPiece']; $ChestPiece = $_POST['ChestPiece']; $ArmPiece = $_POST['ArmPiece']; $LegPiece = $_POST['LegPiece']; $FeetPiece = $_POST['FeetPiece']; mail("gwlpdev@gmail.com", $message, "\{$Profession\} \n$SetName \nHead=$HeadPiece; \nChest=$ChestPiece; \nArm=$ArmPiece; \nLeg=$LegPiece; \nFeet=$FeetPiece;" ); echo "Thank you for submitting your Armor Set, GWLP Appreciate's your Support"; } else //if "email" is not filled out, display the form { echo "<form method='POST' action='input.php'> Profession: <input type='text' name='Profession'/><br /> Armor Set Name: <input type='text' name='SetName'/><br /> Armor Set ID(Head Piece): <input type='text' name='HeadPiece'/><br /> Armor Set ID(Chest Piece): <input type='text' name='ChestPiece'/><br /> Armor Set ID(Arm Piece): <input type='text' name='ArmPiece'/><br /> Armor Set ID(Leg Piece): <input type='text' name='LegPiece'/><br /> Armor Set ID(Feet Piece): <input type='text' name='FeetPiece'/><br /> <input type='submit' /> </form>"; } ?>
  4. I do its in a format that can be copy and pasted Edit: Neither of these worked any ideas please this is very important
  5. I am trying to get { to work in a text field in a email it doesn't seem to show up i need this to work any suggestions? heres my source. Its the { Around Profession on Line 18 <html> <body> <?php if (isset($_POST['Profession'])) //if "email" is filled out, send email { //send email $Profession = $_POST['Profession']; $SetName = $_POST['SetName']; $HeadPiece = $_POST['HeadPiece']; $ChestPiece = $_POST['ChestPiece']; $ArmPiece = $_POST['ArmPiece']; $LegPiece = $_POST['LegPiece']; $FeetPiece = $_POST['FeetPiece']; mail("t.r.s.silent@gmail.com", $message, "{$Profession} \nSet Name=$SetName; \nHead Piece=$HeadPiece; \nChest Piece=$ChestPiece; \nArm Piece=$ArmPiece; \nLeg Piece=$LegPiece; \nFeet Piece=$FeetPiece;" ); echo "Thank you for using our mail form"; } else //if "email" is not filled out, display the form { echo "<form method='POST' action='input.php'> Profession: <input type='text' name='Profession'/><br /> Armor Set Name: <input type='text' name='SetName'/><br /> Armor Set ID(Head Piece): <input type='text' name='HeadPiece'/><br /> Armor Set ID(Chest Piece): <input type='text' name='ChestPiece'/><br /> Armor Set ID(Arm Piece): <input type='text' name='ArmPiece'/><br /> Armor Set ID(Leg Piece): <input type='text' name='LegPiece'/><br /> Armor Set ID(Feet Piece): <input type='text' name='FeetPiece'/><br /> <input type='submit' /> </form>"; } ?>
  6. This was originally from a different script i just forgot to change it >.<
  7. Hey i was wondering how i to email php form results so i looked it up and i have got pretty far but i am stuck my code doesn't seem to work properly. If anyone can check it for errors i would appreciate it. <body> <?php if (isset($_REQUEST['Profession'])) //if "email" is filled out, send email { //send email $Profession = $_POST['Profession']; $SetName = $_POST['SetName']; $HeadPiece = $_POST['HeadPiece']; $ChestPiece = $_POST['ChestPiece']; $ArmPiece = $_POST['ArmPiece']; $LegPiece = $_POST['LegPiece']; $FeetPiece = $_POST['FeetPiece']; mail("dev@gwlp.ragenetwork.com", "Subject: Armor Set", $message, "$head - $SetName - $HeadPiece - $ChestPiece - $ArmPiece - $LegPiece - $FeetPiece" ); echo "Thank you for using our mail form"; } else //if "email" is not filled out, display the form { echo "<form method='post' action='input.php'> Profession: <input type='text' name='Profession'/><br /> Armor Set Name: <input type='text' name='SetName'/><br /> Armor Set ID(Head Piece): <input type='text' name='HeadPiece'/><br /> Armor Set ID(Chest Piece): <input type='text' name='ChestPiece'/><br /> Armor Set ID(Arm Piece): <input type='text' name='ArmPiece'/><br /> Armor Set ID(Leg Piece): <input type='text' name='LegPiece'/><br /> Armor Set ID(Feet Piece): <input type='text' name='FeetPiece'/><br /> <input type='submit' /> </form>"; } ?>
  8. I was reading up a little, maybe a fwrite script would work? I'm not to sure on how to do this but write to a text file called list.txt
  9. I want it to write to a list on another page, which will save for others to view. There will be more then one submission so i need a list
  10. please help, if it helps you out you can use mysql tables if you like
  11. sorry i could not edit the code box covered the edit button, so i have to double post. Ive cleaned up my form heres the remake don't no if it matters <form action="list.htm" method="post" > <table border="1"> <tr> <td>Armor Set ID(Head Piece): </td> <td><input type="text" name="head"/></td> </tr> <tr> <td>Armor Set ID(Chest Piece):</td> <td><input type="text" name="chest"/></td> </tr> <tr> <td>Armor Set ID(Arm Piece):</td> <td><input type="text" name="arm" /></td> </tr> <tr> <td> Armor Set ID(Leg Piece):</td> <td><input type="text" name="leg" /></td> </tr> <tr> <td>Armor Set ID(Feet Peice):</td> <td><input type="text" name="feet" /></td> </tr> <tr> <td></td> <td><input type="submit" /></td> </tr> </table> </form>
  12. Hello, I'm not looking to learn alot of PHP right now but i am learning enough to get done what needs to be done. I need to no how to make a list document that gets and posted form from a different document and puts it into a list, All help is much appreciated. heres my form from my input.htm <form action="list.htm" method="post" > Armor Set ID(Head Piece): <input type="text" name="head"/><br> Armor Set ID(Chest Piece): <input type="text" name="chest"/><br> Armor Set ID(Arm Piece): <input type="text" name="arm" /><br> Armor Set ID(Leg Piece): <input type="text" name="leg" /><br> Armor Set ID(Feet Peice): <input type="text" name="feet" /><br><br> <input type="submit" /> </form>
  13. ive resolved this  i had to change <form action="bbb.php" or whatever you put init to <form action="' . $_SERVER['PHP_SELF'] . '" plz lock
  14. 80    <?php 81 82      if (!isset( $_POST['submit'])) { 83      echo '<form action="bbb.php" method="post"> 84      Username: <input type="text" name="username" /><br /> 85      Password: <input type="password" name="password" /><br /> 86      <input type="submit" name="submit" value="Login" />'; 87      } 88      if (file_exists('users.db')) { 89      $file = file('users.db'); 90      foreach ($file as $info) { 91      $explode = explode('|',$info); 92      $user = $explode[0]; 93      $pass = $explode[1]; 94      $email = $explode[2]; 95      $usern = $_POST['username']; 96      $passw = $_POST['password']; 97      if (($usern == $user) && ($passw == $pass)) { 98        echo( 'Members Area' ); 99      } 100    } 101    } else { 102    $fp = fopen ("users.db", "w+"); 103    fwrite ($fp, ""); 104    fclose ($fp); 105    } 106    ?>
  15. im sorry to be a pain but you last debug seemed to have worked somewhat it fixed the code sortove but i still get Warning: fopen(users.db) [function.fopen]: failed to open stream: Permission denied in /home/xploit/public_html/home/index.php on line 102 Warning: fwrite(): supplied argument is not a valid stream resource in /home/xploit/public_html/home/index.php on line 103 Warning: fclose(): supplied argument is not a valid stream resource in /home/xploit/public_html/home/index.php on line 104
  16. ty and i would debug it myself but im just learning php, my friend made this for me and hes rarely on..
  17. i tried tht and got this error Parse error: syntax error, unexpected $end in /home/xploit/public_html/home/index.php on line 275
  18. i changed <php? to <?php and i get this error Parse error: syntax error, unexpected '{' in /home/xploit/public_html/home/index.php on line 91 which would be this line <?php if( !isset( $_POST['submit'] ) ) { echo( '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"> Username: <input type="text" name="username" /><br /> Password: <input type="password" name="password" /><br /> <input type="submit" name="submit" value="Login" />' ); } else { if( $file_exists( 'users.db' ) >>>>>>>>>>>>>>>>>>>>>>>>>>>{ $file = file( 'users.db' ); foreach( $file as $info ) { $explode = explode( '|', $info ); $user = $explode[0]; $pass = $explode[1]; $email = $explode[2]; $usern = $_POST['username']; $passw = $_POST['password']; if( ( $usern == $user ) && ( $passw == $pass ) ) { echo( 'Members Area' ); } } } else { $fopen = fopen( 'users.db', 'w+' ) fwrite( $fopen, '' ); fclose( $fopen ); } ?>
  19. no <php? is rite becuz when i change it to <?php it errors the whole page
  20. help this isnt workin whats wrong?? [code]<php? if( !isset( $_POST['submit'] ) ) { echo( '<form action="' . $_SERVER['PHP_SELF'] . '" method="post"> Username: <input type="text" name="username" /><br /> Password: <input type="password" name="password" /><br /> <input type="submit" name="submit" value="Login" />' ); } else { if( $file_exists( 'users.db' ) { $file = file( 'users.db' ); foreach( $file as $info ) { $explode = explode( '|', $info ); $user = $explode[0]; $pass = $explode[1]; $email = $explode[2]; $usern = $_POST['username']; $passw = $_POST['password']; if( ( $usern == $user ) && ( $passw == $pass ) ) { echo( 'Members Area' ); } } } else { $fopen = fopen( 'users.db', 'w+' ) fwrite( $fopen, '' ); fclose( $fopen ); } ?>[/code]
×
×
  • 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.