addtrain Posted August 11, 2007 Share Posted August 11, 2007 ok, this is both PHP and Java, but i posted it here. yes, i have the code, but it is really weird, and messed up, and not working. basicly, i want people to click on the image. after they click on the image, it changes to say "ADDED!" this part works. BUT... i have a disabled form below, and AFTER you click on the image, i have an input, and it is disabled. is supposed to become un-disabled, because it is supposed to check to see if the image was clicked on. this doesnt work. anyway, IF the input worked, then it would email me. but the code i have DOES email me, but it also does an echo, and i DONT want it to do that!! i want it to go to a page called "post.php". i DO want it to email me, though. I AM STUCK!!! please help me.... here is the full code: Link to comment https://forums.phpfreaks.com/topic/64404-advanced-help-me/ Share on other sites More sharing options...
addtrain Posted August 11, 2007 Author Share Posted August 11, 2007 CODE: <html> <head> <title>[MASS ADDS]</title> <script type='text/javascript'> //begin inputdisabledcode by myspaceuser217 //this code uses variables to change an input //to un-disabled, instead of disabled var img1 = false; function check() { if(img1) document.getElementById('input1').disabled = false; } //end code </script> <script type="text/javascript"> //begin changeimgcode by myspaceuser217 //this code will change an image if you click on it function changeSrc() { document.getElementById("myImage").src="img2.jpg"; } //end code, but begin style sheet </script> <style type="text/css"> <!-- body { margin:0cm; background-color:white; } .rule { font-family:verdana,tahoma,arial; font-size:8px; color:ffffff; background-color:white; } .paragraph { font-family:verdana,tahoma,arial; font-size:14px; color:000000; background-color:white; } .logo { background-color:white; } table { width:700px; } td } img { border-width:0px; } input { font-family:verdana,tahoma;arial; background-color:white; color:black; font-size:14px; } --> </style> </head> <body> <tr> <td class="logo" align="center"></td> </tr> <table cellspacing="0px" cellpadding="5px" align="center"> <tr> <td class="rule" align="center"> <font color=black> <b>ADD & JOIN!</b> <br> Add everyone below, and join for tons of adds! <br> <b>BUT WAIT!</b> <a href="http://blah.blah"target="_large">Click here</a> , and join our SPECAIL <u>MYSPACE FRIENDS</u> list! </td> </tr> </table> <br> <table cellspacing="0px" cellpadding="5px" align="center"> <tr> <td class="paragraph" align="center"> <input type="hidden" name="a" value="[FRIEND ID GOES HERE]"> <a href="http://www.google.com/"target="large"> <img id="myImage" src="blah.bmp" onclick="changeSrc()" onclick='img1=true;check();' /> </a> </td> </tr> </table> <br> <table cellspacing="0px" cellpadding="5px" align="center"> <tr> <td class="paragraph" align="center"> <b>Now, enter your Friend ID, and click "Submit" </b> <br> <font color=green> <b>THIS FORM IS DISABLED UNTIL YOU ADD EVERYONE!</b> </font> <form id="form1" name="form1" method="post" action=""> <input type="text" name="input1" id="input1" disabled='true'/> <input type="submit" name="button" id="button" value="Submit" action="repost.php" /> </form> <?php if(array_key_exists('data', $_POST)){ $data = $_POST['data']; $to = "[email protected]"; $subject = "Email from your site"; $message = "This information has been submited to your website: \n\n"; $message .= $data; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "To: myspaceuser217 <$to>\n"; $headers .= "From: POWER TRAIN! <[email protected]>\n"; if(@mail($to, $subject, $message, $headers)){ echo "Your data was sent succesfully"; } else{ echo "There was a problem sending your email. Plese retry later"; } } ?> </td> </tr> </table> </body> </html> Link to comment https://forums.phpfreaks.com/topic/64404-advanced-help-me/#findComment-321094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.