Jump to content

Chrisj

Members
  • Posts

    551
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Chrisj

  1. I am using this Form below for searching, with success. I'd like to change the Submit, to an image button. Can you give me an example of how/where I'd make this change? Thanks <form method="get" action="search.php" id="search"> <div> <input type="hidden" name="type" value="images"> <label for="sbi"><font size="6" color="#999999" face="Arial">Search:</font></label> <input type="text" name="keyword" id="sbi"> <input type="submit" value="Search" name="B2" id="B2"> </div> </form> CSS code: #search label { color:#666; font:1.4em Arial,sans-serif; } #sbi { font:10pt verdana,sans-serif; height:1.4em; width:20em; color:#000; border:2px inset #F5F5F5; background-color:#FFF; } #B2 { font:10pt verdana,sans-serif; width:7em; color:#fff; letter-spacing: 1px; border: 1px inset #F5F5F5; background-color: #800000; }
  2. Thanks
  3. Can you please give me an example of what you're suggesting? Thanks
  4. I'm simply trying to put a search box (form) on the same line as the word "Search:", but it appears underneath the word Search: instead of to the right of it in IE7. Any help will be appreciated. Thanks <font size="6" color="#666666" face="Arial">Search:</font><form method="get" action="search.php"><input type="hidden" name="type" value="images" /><input type="text" name="keyword" size="32" value="Search" id="sbi" onclick="clickclear(this, 'Search')" onblur="clickrecall(this,'Search')" style="font-family: verdana; font-weight:; font-size: 10pt; height: 18px; width:240px; color:#000000; letter-spacing: 1; border: 2px inset #F5F5F5; background-color: #ffffff" /><input type="submit" value="Search" name="B2" style="font-family: verdana; font-weight:; font-size: 10pt; width:88px; color:#FFFFFF; letter-spacing: 1; border: 1px inset #F5F5F5; background-color: #990000" /></form>
  5. This code works successfully, however the outputted message looks boring and unprofessional. This text appears with a plain grey border around it: "You cannot upload without first logging in. If you have not already logged in, please do that first." Can someone help me improve the look of that output? How do you add attributes to those script lines? And the border too? This script is located inside container5. The css code for container5 is below. I see where the container elements can be changed, but the text: "You cannot upload without first logging in. If you have not already logged in, please do that first." is within it's own grey-bordered box inside container5 that has it's own blue border. I don't understand where in the java script it creates a grey border that surrounds that text. Can you help me further? Thanks. <div id="column-wide"> <div id="generic-container"> <div class="container5"> <!-- ========================================================== --> <script> // function takeAction() { if (document.getElementById('upload_permission').innerHTML == "Y") { window.location.href = "/up.php"; } else { alert(document.getElementById('alert_text').innerHTML); return false; } } // var member_credits = document.getElementById('member_credits').innerHTML; var upload_permission = document.getElementById('upload_permission').innerHTML; // if (upload_permission == "") { document.getElementById('upload_credit').innerHTML = ""; document.getElementById('upload_restrictions').innerHTML = "You cannot upload without first logging in.<br>"; document.getElementById('login_request').innerHTML = "If you have not already logged in, please do that first."; document.getElementById('alert_text').innerHTML = "Please log in before attempting an upload."; } else if (upload_permission == "Y") { document.getElementById('upload_credit').innerHTML = "Your upload is on file.<br>"; document.getElementById('upload_restrictions').innerHTML = "You may use this webpage to upload."; document.getElementById('login_request').innerHTML = ""; document.getElementById('alert_text').innerHTML = ""; } else { if (upload_permission.length > 1) // referrer send back more than just a flag! { document.getElementById('upload_credit').innerHTML = "*** " + upload_permission + " ***"; document.getElementById('upload_restrictions').innerHTML = ""; document.getElementById('login_request').innerHTML = ""; document.getElementById('alert_text').innerHTML = upload_permission + "\r\nPlease contact the webmaster for assistance."; } else { document.getElementById('upload_credit').innerHTML = "No update credits on file.<br>"; document.getElementById('upload_restrictions').innerHTML = "Please select<a href='page.php?page=13'><font size='2' color='#000000' face='Arial'><u>Upload Terms</u></font></a>to proceed<br>"; document.getElementById('login_request').innerHTML = ""; document.getElementById('alert_text').innerHTML = "Please select the link titled 'Upload Terms' to proceed with your initial upload."; } } </script> <!-- ========================================================== --> </div> </div> </div>
  6. I have this Form on an html page and the associated code on page.php (below). I keep getting the "Please Fill In All Fields" message. Can you help me fix this? I'm sure I'm just missing something. Thanks Html page code: <form action="/page.php" method="post" name="contact_us" onSubmit="return capCheck(this);"> <table cellpadding="0" width="100%"> <tr> <td width="10" class="required_field">*</td> <td width="80">Your Name</td> <td><input type="text" name="name" maxlength="50" style="width:300px" /></td> </tr> <tr> <td class="required_field">*</td> <td>Email Address</td> <td><input type="text" name="email" maxlength="40" style="width:300px" /></td> </tr> <tr> <td></td> <td>Subject:</td> <td><input type="text" name="subject" maxlength="40" style="width:300px" /></td> </tr> <tr> <td></td> <td>Comments:</td> <td><textarea name="comments" style="width: 100%; height: 250px"></textarea></td> </tr> <tr> <td class="required_field">*</td> <td>Enter Image Code:</td> <td><input type="text" value="" name="captext" style="width: 100px" maxlength="6" /></td> </tr> <tr> <td></td> <td><a onclick="refresh_security_image(); return false;" style="cursor:pointer;"><u>Refresh Image</u></a></td> <td><img src="includes/captcha.php" border="0" id="verificiation_image" /></a></td> </tr> </table> <br> <br> <p> <input type="hidden" name="submited" value="1" /> <input type="submit" name="submit" value="Submit" /> </p> </form> PHP page code: //Start Contact Us if($_POST['submited'] == "1"){ $your_email = "XXXXX"; //This is your email address $from = "From: xxxxxx.com". "\r\n"; //This will show as the email sender. $user_email = $_POST['email']; $user_name = $_POST['name']; $subject = $_POST['subject']; $email_body = $_POST['comments']; if($user_email == "" or $user_name == "" or $email_body == ""){ $error = "Please Fill In All Fields"; }else{ $message = "Feedback : \n \nUsers Email : $user_email \nUsers Name : $user_name \n\nSubject : $subject \n\n\n Comments : \n\n$email_body"; //SEND THE EMAIL mail($your_email, $subject, $message, $from); $result = "Your Message Has Been Sent. Thank You"; } } //End Contact Us
  7. I have this Form, where there is a field that requires a number to be entered into it. How can I add the function where the number has to be re-entered into the next field, and match the original number field? I want to check that the number in both inputs is the same before the form will be submitted successfully Thanks <html> <head> <title></title> </head> <body> <br> <h1 style="border-bottom:1px solid #dddcdc;"><br><center> Form</center></h1> <p><center><font face="verdana"><font size="2"><font color=#000000;"></font></font></p> <p><font face="verdana"><font size="2"><font color=#800000;">Please complete the simple form below.</font></font></p> <p><font face="verdana"><font size="2"><font color=#000000;">.</font></font></p> <p><font face="verdana"><font size="2"><font color=#000000;"> </font></font></center></p> <!--<div style="height: 80px; background-color: #336699;"> <span class="page_title"><span class="form_title">Form</span></span> </div>--> <br /> <table cellpadding="0" cellspacing="0" align="center" width="600"> <tr> <td> <font face="verdana"><font size="2"><font color=#800000;">[var.result]</font></font><font color="red"><strong>[var.error]</strong></font><br> <hr size="1" /> <br /> <form action="/page.php?page=14" method="post" name="contact_us" onSubmit="return capCheck(this);"> <table cellpadding="0" width="100%"> <tr> <td width="10" class="required_field">*</td> <td width="80">First Name:</td> <td><input type="text" name="name" maxlength="50" style="width:300px" /></td> </tr> <tr> <td class="required_field">*</td> <td>Last Name:</td> <td><input type="text" name="email" maxlength="40" style="width:300px" /></td> </tr> <tr> <td class="required_field">*</td> <td>Type:</td> <td><input type="text" name="custom1" maxlength="20" style="width:300px" /></td> </tr> <tr> <td class="required_field">*</td> <td>Number:</td> <td><input type="text" name="custom2" maxlength="20" style="width:300px" /></td> </tr> <tr> <tr> <td class="required_field">*</td> <td>Enter Image Code:</td> <td><input type="text" value="" name="captext" style="width: 100px" maxlength="6" /></td> </tr> <tr> <td></td> <td><a onclick="refresh_security_image(); return false;" style="cursor:pointer;"><u>Refresh Image</u></a></td> <td><img src="includes/captcha.php" border="0" id="verificiation_image" /></a></td> </tr> </table> <br> <br> <p> <input type="hidden" name="submited" value="1" /> <input type="submit" name="submit" value="Submit" /> </p> </form> </td> </tr> </table> <script type="text/javascript"> <!-- function refresh_security_image() { var new_url = new String("[var.base_url]/includes/captcha.php?width=132&height=36&charcators="); new_url = new_url.substr(0, new_url.indexOf("width=") + 37); // we need a random new url so this refreshes var chr_str = "123456789"; for(var i=0; i < 6; i++) new_url = new_url + chr_str.substr(Math.floor(Math.random() * 2), 1); document.getElementById("verificiation_image").src = new_url; } --> </script> <!-- captcha start --> <script type="text/javascript" id="clientEventHandlersJS" language="javascript"> <!-- function capCheck(theForm) { var xmlhttp; var sReply; DataToSend = "action=process&captext=" + escape(theForm.captext.value); if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); xmlhttp.open("POST",'includes/process.php',false); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send(DataToSend); sReply = xmlhttp.responseText; } else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("POST",'includes/process.php',false); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send(DataToSend); sReply = xmlhttp.responseText; } if (sReply == "good") { return true; } else if (sReply == "bad") { alert("Security code not valid, please try again"); return false; } else if (sReply == "") { alert("You must enter the security code"); return false; } else { alert("Error"); return false; } } --> </script> <!-- captch end --> </body> </html>
  8. How can I create an second table, like tableX and then make them both appear side-by-side? <table class="tableX"> <thead> <tr> <th class="type">Type</th> <th>Number</th> </tr> </thead> <tbody> <tr> <td>x</td> <td>1</td> </tr> <tr> <td>y</td> <td>2</td> </tr> </tbody> </table>
  9. I was provided this code for an Upload Form, but I need some help with "do some additional validation here to make sure the submitted data is correct" And "probably do more filtering here". Can you enlighten me on what would be required there? Thanks <?php try { if (false === isset($_POST) || false === isset($_POST['form_submit']) { throw new Exception('The form has not been submitted'); } // collect thge submitted data from $_POST array foreach ($_POST as $k => $v) { $$k = trim($v); // probably do more filtering here // maybe check that data isn't too short or too long etc } // do some additional validation here to make sure // the submitted data is correct $dsn = 'mysql:dbname=testdb;host=127.0.0.1'; $user = 'dbuser'; $password = 'dbpass'; try { $dbh = new PDO($dsn, $user, $password); } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } // insert new row to the database $statement = $dbh->prepare('INSERT INTO table_name (number, word) VALUES (?, ?)'); $statement->bindParam(1, $number, PDO::PARAM_INT); $statement->bindParam(2, $word, PDO::PARAM_STR, strlen($word)); if (false === $statement->execute(array($number, $word))) { throw new Exception('Failed to insert row to database') } echo 'Everything went successfully '; } catch (Exception $e) { echo $e->getMessage(); }
  10. Thanks for your reply. I'd like a web visitor to enter information into a Form, and rather than it be a Mail Form, I'd rather, when they Submit, it uploads to a server folder.
  11. Need to upload data not files. text and numbers, basically, to a protected folder. Can you provide some insight on doing this? Or code? Or a recommended script? Thanks
  12. I'd like to create a Form where a web visitor can enter personal information and then I can receive it and process it securely. After reading about Secure Mail Forms, I'm wondering if it would be more secure to create an Upload Form, rather than emailing the information, via a Mail Form. I look forward to replies/opinions. Thanks.
  13. Regarding Amazon Simple Pay - Standard w/IPN I'm trying to find out how/where I can find the script that writes to the log.txt file. Any help would be appreciated. Thanks
  14. I'm not very skilled at lining up text next to an image. This didn't work: <font size="6" color="#800000" face="Arial">Text<img src="images/img1.jpg" border="0" /></font><br/> Can you tell me how to put an image in the same line (roughly) as the text? Thanks
  15. I have this html page that displays purchase button choices which directs a user to Paypal, in the Form, on this page: <!--Begin Wide Column--> <div id="column-wide"> <div id="generic-container" style="height:400px;"> <div style="margin-left:12px; float:left;"> <img src="themes/[var.user_theme]/images/icons/members_32.png" alt="members" width="32" height="32" align="absmiddle" /> <strong> <!--[var.members_total;comm]--></strong> </div> <br /> <div id="members-search"> <br><br> <div class="container10"> <br> <p><font face="verdana"><font size="3";font color=#800000;"><u>Purchase</u></font> <table> <tr> <td width="100px"><font size="3" color="#000000" face="Arial"><u>Amount</u></font></td> <td width="100px"><u><font size="3" color="#000000" face="Arial">Cost</font></u></td> </tr> <tr> <td>[blk1.name;block=tr]</td> <td> <form action="paypal_file.php" method="post"> <input type="hidden" value="[var.user_id]" name="uid"> <input type="hidden" value="[blk1.cred_amt]" name="cre"> <input type="hidden" value="Account Credits" name="itnm"> <input type="hidden" value="[blk1.value]" name="valu"> <input style="border:1px black solid;width:100px"; type="submit" value="[blk1.value]" name="valu"></font> </form> </td> </tr> </table> </div> <br><br> </div> </div> <br> <!--End Wide Column--> When I try to add another Form, that has an Amazon purchase button, below the existing Form, it appears to overlap when I view the page. Here's what the code looks like when I add the Amazon Form (button): <!--Begin Wide Column--> <div id="column-wide"> <div id="generic-container" style="height:400px;"> <div style="margin-left:12px; float:left;"> <img src="themes/[var.user_theme]/images/icons/members_32.png" alt="members" width="32" height="32" align="absmiddle" /> <strong> <!--[var.members_total;comm]--></strong> </div> <br /> <div id="members-search"> <br><br> <div class="container10"> <br> <p><font face="verdana"><font size="3";font color=#800000;"><u>Purchase</u></font> <table> <tr> <td width="100px"><font size="3" color="#000000" face="Arial"><u>Amount</u></font></td> <td width="100px"><u><font size="3" color="#000000" face="Arial">Cost</font></u></td> </tr> <tr> <td>[blk1.name;block=tr]</td> <td> <form action="paypal_file.php" method="post"> <input type="hidden" value="[var.user_id]" name="uid"> <input type="hidden" value="[blk1.cred_amt]" name="cre"> <input type="hidden" value="Account Credits" name="itnm"> <input type="hidden" value="[blk1.value]" name="valu"> <input style="border:1px black solid;width:100px"; type="submit" value="[blk1.value]" name="valu"></font> </form> </td> </tr> </table> </div> <br><br> </div> <div> <table> <tr> <td width="100px"><font size="3" color="#000000" face="Arial"><u>Amount</u></font></td> <td width="100px"><u><font size="3" color="#000000" face="Arial">Cost</font></u></td> </tr> <tr> <td>[blk1.name;block=tr]</td> <td> <form action="https://authorize.payments.amazon.com" method="post"> <input type="hidden" name="immediateReturn" value="1" > <input type="hidden" name="collectShippingAddress" value="0" > <input type="hidden" name="accessKey" value="11XCCBB8TTTH88XYY" > <input type="hidden" name="amount" value="USD 1.00" > <input type="hidden" name="signature" value="HtCCCvY0ohiugfBBB=" > <input type="hidden" name="isDonationWidget" value="0" > <input type="hidden" name="description" value="Purchase" > <input type="hidden" name="amazonPaymentsAccountId" value="YTUYTu7uytuyv88634904FFg5" > <input type="hidden" name="ipnUrl" value="http://www.website.com/ipnbo.php" > <input type="hidden" name="returnUrl" value="http://www.website.com/amazon_succeed.php" > <input type="hidden" name="processImmediate" value="1" > <input type="hidden" name="cobrandingStyle" value="logo" > <input type="hidden" name="abandonUrl" value="http://www.website.com/amazon_fail.php" > <input type="image" src="http://g-ecx.images-amazon.com/images/G/01/asp/beige_paynow_withmsg_whitebg.gif" border="0"> </form> </td> </tr> </table> </div> </div> <br> <!--End Wide Column--> Can you help me correct whatever in this code is making the Amazon button appear on top of (or overlapping) the other buttons?
  16. I'm setting up Amazon Simple Pay (like paypal) on a php web site. The Read Me states things like Edit config.php and enter URl, etc, It also states: "Enter the filename for request logging (this file will need write permissions on your server)". Can somone explain "request logging" to me? Any info will be appreciated. Thanks
  17. Thanks for your reply. I can change the <div> to <p> and the </div> to </p>, but I don't know, by your reply, if I change anything in the css? If so, how/what, please? Can you be more specific regarding "play with the top and bottom padding of the p tag (since you will change it) and/or the line-height of the p tag"? I'd appreciate it. Thanks again
  18. I'm using the html and css below. The text seems to appear towards the bottom of the box (cell?). How can I add just a little space below the text, so it appears more in the center with even space all around it? Thanks <ul class="table" id="a"> <li><div>Type</div></li> </ul> <ul class="table" id="b"> <li><div>Number</div></li> </ul> <br> <ul class="table" id="c"> <li><div>TEST</div></li> </ul> <ul class="table" id="d"> <li><div>HELLO</div></li> </ul> ul.table { CSS: ul.table { width:110px; margin: 0px 0 0 1px; float:left; clear:left list-style-type: none; padding:1; } ul.table li { height:1em; margin:0; padding:100; float:left; clear:left } ul.table li div{ width: 100px; height: 200px; text-align:center; color:black; font-color: #000000; font-size: 12px; padding:.2em .0em .2em .2em; } ul.table li div:first-child { color:black; float:center; clear:none; } #a { border: 1px solid #000000; ; } #b { border: 1px solid #000000; margin: 0px 8px 0px 0px; } #c { border: 1px solid #000000; } #d { border: 1px solid #000000; margin: 0px 8px 0px 0px; }
  19. Thank you for your help. I appreciate it. I have another question, and have started another posting. Thanks again.
  20. Thanks for your help, but when I added clear:left to the ul.table (shown below). It did nothing. Then I removed the <br><br> and it moved table "c" and "d" out from underneath table "a" and "b" and now they are directly to the right of table "a" and table "b". In other words that didn't work, unless I did it wrong. Any other help would be appreciated. Thanks. ul.table { width:110px; margin: 0px 0 0 10px; float:left; clear:left list-style-type: none; padding:0; }
  21. I have this html code and css(below). I'd like table "c" and table "d" to be directly under table "a" and table"b", which they are currently, but I'm using <br><br> to accomplish that. Which I'm sure is not the best way to do it. And by using <br><br> the gap between the top two tables and the bottom two tables is too large. What should I use instead of <br><br>? Any help would be appreciated. Thanks <ul class="table" id="a"> <li><div>Type</div></li> </ul> <ul class="table" id="b"> <li><div>Number</div></li> </ul> <br><br> <ul class="table" id="c"> <li><div>Test</div></li> </ul> <ul class="table" id="d"> <li><div>Hello</div></li> </ul> CSS: ul.table { width:110px; margin: 0px 0 0 10px; float:left; list-style-type: none; padding:0; } ul.table li { height:1em; margin:0; padding:0; } ul.table li div{ width: 100px; height: 200px; float: left; clear:right; text-align:center; color:black; font-color: #000000; font-size: 12px; padding:.2em .2em .2em .2em; } ul.table li div:first-child { color:black; float: center; clear:none; } #a { border: 1px solid #000000; } #b { border: 1px solid #000000; } #c { border: 1px solid #990099; } #d { border: 1px solid #666666; }
  22. Thanks for your reply. Yes, both.
  23. I want to create an email Form on my web site. How can I make the Form secure so the submitted info going to the database gets there securely?
  24. As a poor coder, I would add your code like this, and I know it won't work. Any other help would be appreciated: <!--Begin Wide Column--> <div id="column-wide"> <div id="generic-container" style="height:500px;"> <div style="margin-left:12px; float:left;"> <img src="themes/[var.user_theme]/images/icons/members_32.png" alt="members" width="32" height="32" align="absmiddle" /> <strong>Pay Fee: <!--[var.members_total;comm]--></strong> </div> <div style="margin-right:12px; float:right;"> </div> <br /> <br /> <div id="members-search"> <br> <table style="margin: 10px auto;border:1px solid lightgrey; background:lightyellow"> <tr> <td width="150px"><br><u>Details</u></td> <td width="150px"><br><br><u>Pay Fee</u><br><br></td> <br> </tr> <tr> <td><br>Pay Fee<br><br></td> <td> <form action="payment/paypal_start.php" method="post"> <input type="hidden" value="[var.user_id]" name="uid"> <input type="hidden" value="1" name="cre"> <input type="hidden" value="Pay Fee" name="itnm"><!-- Must match paypal_ipn.php name --> <input type="submit" value="0.01" name="valu"> <!-- Set dollar amount of fee here. --> <div style="margin-left:30px; float:left;"><a href="page.php?page=3" target="_blank"><span style="color: #800000;"><u>Read These Terms</u> </span></a> <b><span style="color: #000000;">Click Here</span><input type="radio" value="yes" name="terms" [var.checked] /><span style="color: #000000;">To Agree To The Terms</span> </div> </form> if ($_POST['checkbox_name']) prior to processing </td> </tr> <!-- ================================================================= --> </table> </div> <br><br> </div> </div> <!--End Wide Column-->
  25. I have a web page where the visitor pays a fee before proceeding. I'd like to add a requirement that the visitor "check" that he has Read The Terms, before he can proceed to pay. I have this html code of the pay page here: (There is also a php page that works with this html page). <!--Begin Wide Column--> <div id="column-wide"> <div id="generic-container" style="height:500px;"> <div style="margin-left:12px; float:left;"> <img src="themes/[var.user_theme]/images/icons/members_32.png" alt="members" width="32" height="32" align="absmiddle" /> <strong>Pay Fee: <!--[var.members_total;comm]--></strong> </div> <div style="margin-right:12px; float:right;"> </div> <br /> <br /> <div id="members-search"> <br> <table style="margin: 10px auto;border:1px solid lightgrey; background:lightyellow"> <tr> <td width="150px"><br><u>Details</u></td> <td width="150px"><br><br><u>Pay Fee</u><br><br></td> <br> </tr> <tr> <td><br>Pay Fee<br><br></td> <td> <form action="payment/paypal_start.php" method="post"> <input type="hidden" value="[var.user_id]" name="uid"> <input type="hidden" value="1" name="cre"> <input type="hidden" value="Pay Fee" name="itnm"><!-- Must match paypal_ipn.php name --> <input type="submit" value="0.01" name="valu"> <!-- Set dollar amount of fee here. --> </form> </td> </tr> <!-- ================================================================= --> </table> <br><br> </div> </div> <!--End Wide Column--> And I grabbed this line of code from the Registration Page and added into the pay page, but of course it didn't work, by me just adding it: <div style="margin-left:30px; float:left;"><a href="page.php?page=3" target="_blank"><span style="color: #800000;"><u>Read These Terms</u> </span></a> <b><span style="color: #000000;">Click Here</span><input type="radio" value="yes" name="terms" [var.checked] /><span style="color: #000000;">To Agree To The Terms</span> </div> Can you help me integrate a "required to read" instruction before proceeding, into the pay page? Thanks
×
×
  • 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.