CyberiaPC.com Community Forums Main Page
RSS Feeds: Late(st) News | Zenith Picture Gallery | Most Recent Community Topics | Tips, Tricks and Other Useful Stuff

Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> n00b to PHP and need help
j-rah
post Dec 23 2005, 07:15 PM
Post #1


SuperNova II Member
Group Icon

Group: Moderators
Posts: 1,197
Joined: 19-November 03
Member No.: 694

Switzerland

Bubble Trouble Champion!
Blackjack 2 Champion!



Ok heres what I got and I can't get anything to come up on the webpage. I know there has to be a problem with the code and I can't find it.

Please help!

CODE
<?
session_start();
include "content_mgmt/content_inc.php";
$content_id = "savings";
$imageSection = "/images/";

include $_SERVER['DOCUMENT_ROOT']."/includes/header.php";

// ------------- CONFIGURABLE SECTION ------------------------

// $mailto - set to the email address you want the form
// sent to, eg
//$mailto  = "youremailaddress@example.com";

$mailto = 'youremailaddress@example.com';

// $subject - set to the Subject line of the email, eg
//$subject    = "Feedback Form";

$subject = "Check Re-Order Form";

// the pages to be displayed, eg
//$formurl  = "http://www.example.com/feedback.html";
//$errorurl  = "http://www.example.com/error.html";
//$thankyouurl    = "http://www.example.com/thankyou.html";

$formurl = "http://www.example.com/feedback.html";
$errorurl = "http://www.example.com/error.html";
$thankyouurl = "http://www.example.com/thankyou.html";

// -------------------- END OF CONFIGURABLE SECTION ---------------

$acctnum = $_REQUEST['acctnum'];
$chknum = $_REQUEST['chknum'];
$name1 = $_REQUEST['name1'];
$name2 = $_REQUEST['name2'];
$address = $_REQUEST['address'];
$city = $_REQUEST['city'];
$zip = $_REQUEST['zip'];
$phone = $_REQUEST['phone'];
$dl1 = $_REQUEST['dl1'];
$dl2 = $_REQUEST['dl2'];
$picnum = $_REQUEST['picnum'];
$email = $_REQUEST['email'];

$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['email'])) {
    header( "Location: $formurl" );
    exit;
}
if (empty($name) || empty($email) || empty($comments)) {
  header( "Location: $errorurl" );
  exit;
}
$name = strtok( $name, "\r\n" );
$email = strtok( $email, "\r\n" );
if (get_magic_quotes_gpc()) {
    $comments = stripslashes( $comments );
}

$messageproper =

    "This message was sent from:\n" .
    "$http_referrer\n" .
    "------------------------- COMMENTS -------------------------\n\n" .
    $comments .
    "\n\n------------------------------------------------------------\n";

mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\r\nReply-To: \"$name\" <$email>\r\nX-Mailer: chfeedback.php 2.04" );
header( "Location: $thankyouurl" );
exit;

?>
<table border="0" width="761" cellspacing="0" cellpadding="0" id="table3">
       <tr>
               <td height="7">
               <img border="0" src="images/spacer.gif" width="1" height="1"></td>
       </tr>
       <tr>
               <td height="2" bgcolor="#ADABA2">
               <img border="0" src="images/spacer.gif" width="1" height="1"></td>
       </tr>
       <tr>
               <td height="10">
               <table border="0" width="761" cellspacing="0" cellpadding="0" id="table10">
                       <tr>
                               <td bgcolor="#ADABA2" width="2">
                               <img border="0" src="images/spacer.gif" width="2" height="1"></td>
                               
         <td bgcolor="#E5E2DB"> <img border="0" src="images/ES_hdr1.jpg" width="211" height="123"><img border="0" src="images/ES_hdr1.gif" width="243" height="37"></td>
                               <td bgcolor="#ADABA2" width="2">
                               <img border="0" src="images/spacer.gif" width="1" height="1"></td>
                       </tr>
               </table>
               </td>
       </tr>
</table>


       <table border="0" width="761" cellspacing="0" cellpadding="0" id="table4">
               <tr>
                       <td width="761" colspan="3" bgcolor="#ADABA2" height="1">
                       <img border="0" src="images/spacer.gif" width="1" height="1"></td>
               </tr>
               <tr>
                       <td width="2" bgcolor="#ADABA2">
                       <img border="0" src="images/spacer.gif" width="1" height="1"></td>
                       <td width="757" bgcolor="#E5E2DB" valign="top">
                       
     <table border="0" width="100%" cellspacing="0" cellpadding="0" id="table6">
       <tr>
         <td width="25">&nbsp;</td>
         <td height="25"><img src="images/check_ordering.gif" width="134" height="16"><br>
         </td>
         <td width="25">&nbsp;</td>
       </tr>
       <tr>
         <td width="25">&nbsp;</td>
         <td>&nbsp;</td>
         <td width="25">&nbsp;</td>
       </tr>
       <tr>
         <td width="25">&nbsp;</td>
         <td> Thank you for ordering your checks through Security Federal. We
           appreciate your business.<br>
           <br>
           If you chose to pick up your checks at one of our branches and fail
           to do so after 7 days; your checks will be mailed to you and your
           account will be charged for the postage.</td>
         <td width="25">&nbsp;</td>
       </tr>
       <tr>
         <td width="25">&nbsp;</td>
         <td height="40">&nbsp;</td>
         <td width="25">&nbsp;</td>
       </tr>
     </table>
                       </td>
                       <td width="18" height="300" bgcolor="#E5E2DB">&nbsp;</td>
                       <td width="1" bgcolor="#ADABA2">
                       <img border="0" src="images/spacer.gif" width="2" height="1"></td>
               </tr>
       </table>
<?
}
else
{
?>
<table width="761" border="0" cellspacing="0">
 <tr>
   <td bgcolor="#E5E2DB"> <img border="0" src="images/ES_hdr1.jpg" width="211" height="123"><img border="0" src="images/ES_hdr1.gif" width="243" height="37"></td>
 </tr>
 <tr>
   <td bgcolor="#E5E2DB">
     <table border="0" width="761" cellspacing="0" cellpadding="0" id="table4">
       <tr>
         <td width="761" colspan="3" bgcolor="#ADABA2" height="1"> <img border="0" src="images/spacer.gif" width="1" height="1"></td>
       </tr>
       <tr>
         <td width="2" bgcolor="#ADABA2"> <img border="0" src="images/spacer.gif" width="1" height="1"></td>
         <td width="757" bgcolor="#E5E2DB" valign="top">
           <table border="0" width="100%" cellspacing="0" cellpadding="0" id="table6">
             <tr>
               <td width="25">&nbsp;</td>
               <td height="25">&nbsp;</td>
               <td width="25">&nbsp;</td>
             </tr>
             <tr>
               <td width="25">&nbsp;</td>
               <td> <img src="images/check_ordering.gif" width="134" height="16"></td>
               <td width="25">&nbsp;</td>
             </tr>
             <tr>
               <td width="25">&nbsp;</td>
               <td> <br>
                 <FORM ACTION="contactus.php" method="POST" name="myform">
                   <TABLE>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">Full
                         Account #: (as written on check)</font></b></TD>
                       <td width="304"> <font color="#000000">
                         <input type="text" name="acctnum" MAXLENGTH="12" size="20" value="">
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">Starting
                         Check #:</font></b></TD>
                       <td width="304"> <font color="#000000">
                         <input type="text" name="chknum" maxlength="5" size="8" value="">
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">Name
                         (as you want on check):</font></b></TD>
                       <TD width="304"> <font color="#000000">
                         <INPUT TYPE="text" NAME="name" SIZE="25" value="">
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">Name
                         (as you want on check):</font></b></TD>
                       <TD width="304"> <font color="#000000">
                         <INPUT TYPE="text" NAME="name2" SIZE="25" value="">
                         </font></TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">Address:</font></b></TD>
                       <TD width="304"> <font color="#000000">
                         <INPUT TYPE="text" NAME="address" SIZE="25" value="">
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">City:</font></b></TD>
                       <td width="304"> <font color="#000000">
                         <input type="text" name="city" size="20" value="">
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">State:
                         (put abbrev.)</font></b></TD>
                       <td width="304"> <font color="#000000">
                         <INPUT TYPE="text" NAME="state" maxlength="2" size="5" VALUE="IN" onfocus="javascript:if(this.value=='IN') {this.value='';}" onblur="javascript:if(this.value=='') {this.value='IN'}" onKeyUp="return autoTab(this, 2, event)">
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">ZIP
                         Code:</font></b></TD>
                       <td width="304"> <font color="#000000">
                         <input type="text" name="zip" maxlength="5" size="8" onKeyUp="return autoTab(this, 5, event)" value="">
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">Phone
                         #:</font></b></TD>
                       <td width="304"> <font color="#000000">
                         <input type="text" name="telephone" onKeyPress="javascript:getIt(this)" onKeyUp="return autoTab(this, 13, event)" maxlength="13" size="15" value="">
                         </font></TD>
                     </TR>
                     <TR>
                       <TD width="304" height="29"><b><font class="NAV" color="#000000">DL
                         #:</font></b></TD>
                       <TD width="304" height="29"> <font color="#000000">
                         <input type="text" name="telephone2" onKeyPress="javascript:getIt(this)" onKeyUp="return autoTab(this, 13, event)" maxlength="13" size="15" value="">
                         </font></TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font class="NAV" color="#000000">DL
                         #:</font></b></TD>
                       <TD width="304"> <font color="#000000">
                         <input type="text" name="telephone3" onKeyPress="javascript:getIt(this)" onKeyUp="return autoTab(this, 13, event)" maxlength="13" size="15" value="">
                         </font></TD>
                     </TR>
                     <TR>
                       <TD width="304" height="14"><b><a href="#" onClick="window.open('monogram.php','myExample6','width=475,height=285,screenX=100,screenY=100,top=100,left=100')" onMouseOver="window.status='Monogram'; return true;" onMouseOut="window.status=' '; return true;">Monogram</a>
                         / <a href="#" onClick="window.open('woodcut.php','myExample6','width=475,height=285,screenX=100,screenY=100,top=100,left=100')" onMouseOver="window.status='Woodcut'; return true;" onMouseOut="window.status=' '; return true;">Woodcut</a>:<br>
                         </b></TD>
                       <TD width="304" height="14"> <font color="#000000">
                         <input type="text" name="picture#" maxlength="3" size="8" onKeyUp="return autoTab(this, 5, event)" value="">
                         <font class="NAV">(enter the number)</font></font>
                     <TR>
                       <TD width="304" height="14"><b><font class="NAV" color="#000000">Lettering:</font></b></TD>
                       <TD width="304" bgcolor="#E5E2DB" height="14">
                         <SELECT NAME="lettering">
                           <option value="Times New Roman 9pt">Times New Roman
                           9pt</option>
                           <option value="Times New Roman 10pt">Times New Roman
                           10pt</option>
                           <option value="Arial 9pt">Arial 9pt</option>
                           <option value="Arial 10pt">Arial 10pt</option>
                           <option value="Calligraphy">Calligraphy</option>
                           <option value="Script">Script</option>
                           <option value="Old English">Old English</option>
                         </SELECT>
                         *&nbsp;&nbsp;&nbsp;<a href="#" onClick="window.open('fonts.php','myExample6','width=475,height=285,screenX=100,screenY=100,top=100,left=100')" onMouseOver="window.status='Fonts'; return true;" onMouseOut="window.status=' '; return true;">Fonts</a></TD>
                     </TR>
                     <TR>
                       <TD height="2" width="304"><b><font color="#000000">Color:</font></b></TD>
                       <TD height="2" width="304"> <font color="#000000">
                         <select name="color">
                           <option value="Blue Fine Line">Blue Fine Line</option>
                           <option value="Burgandy Marble">Burgandy Marble</option>
                           <option value="Green Fine Line">Green Fine Line</option>
                           <option value="Brown Marble">Brown Marble</option>
                           <option value="Lighthouse Scene">Lighthouse Scene</option>
                           <option value="Liberty Checks">Liberty Checks</option>
                           <option value="Mountain Scene">Mountain Scene</option>
                           <option value="Wildlife Scenes">Wildlife Scenes</option>
                           <option value="Stars and Stripes">Stars and Stripes</option>
                           <option value="Gray Business">Gray Business</option>
                           <option value="Blue Business">Blue Business</option>
                           <option value="Payroll Stub Tan">Payroll Stub Tan</option>
                           <option value="Payroll Stub Blue">Payroll Stub Blue</option>
                           <option value="None(Deposit Slips)">None(Deposit Slips)</option>
                           <option value="Voucher Check Blue">Voucher Check Blue</option>
                         </select>
                         *</font></TD>
                     </TR>
                     <tr>
                       <td width="304" height="36"><b><font class="NAV" color="#000000">Type
                         Of Check &amp; Quantity:</font></b></td>
                       <td width="304" height="36"> <font color="#000000">
                         <select name="quantity">
                           <option value="Regular Wallet Style 200"><font color="#000000">Regular
                           Wallet Style 200</font></option>
                           <option value="Regular Duplicate 160"><font color="#000000">Regular
                           Duplicate 160</font></option>
                           <option value="Personal Deposit Slips 100"><font color="#000000">Personal
                           Deposit Slips 100</font></option>
                           <option value="Business Checks 300"><font color="#000000">Business
                           Checks 300</font></option>
                           <option value="Business Checks 500"><font color="#000000">Business
                           Checks 500</font></option>
                           <option value="Business Deposit Slips 200"><font color="#000000">Business
                           Deposit Slips 200</font></option>
                           <option value="Voucher Checks 1/page"><font color="#000000">Voucher
                           Checks 1/page</font></option>
                           <option value="Voucher Checks 3/page"><font color="#000000">Voucher
                           Checks 3/page</font></option>
                           <option value="Bus. Dup. 4/page Dep Slips"><font color="#000000">Bus.
                           Dup. 4/page Dep Slips</font></option>
                         </select>
                         *</font> </td>
                     </tr>
                     <TR>
                       <TD width="304"><b><font color="#000000">Cover:</font></b></TD>
                       <TD width="304"> <font color="#000000">
                         <select name="cover">
                           <option value="None" selected><font color="#000000">None</font></option>
                           <option value="Black"><font color="#000000">Black</font></option>
                           <option value="Blue"><font color="#000000">Blue</font></option>
                           <option value="Burgandy"><font color="#000000">Burgandy</font></option>
                           <option value="Green"><font color="#000000">Green</font></option>
                         </select>
                         </font></TD>
                     </TR>
                     <TR>
                       <TD width="304" height="21"><b><font class="NAV" color="#000000">Mail
                         or Pickup:</font></b></TD>
                       <TD width="304" height="21"> <font color="#000000">
                         <select name="destination">
                           <option value="Pick-Up Main Branch">Pick-Up Main Branch</option>
                           <option value="Pick-Up Mall Branch">Pick-Up Mall Branch</option>
                           <option value="Pick-Up Kokomo">Pick-Up Kokomo</option>
                           <option value="Mail">Mail</option>
                         </select>
                         *</font> </TD>
                     </TR>
                     <TR>
                       <TD width="304"><b></b></TD>
                       <TD width="304">&nbsp;</TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font color="#000000">Confirmation:
                         </font></b></TD>
                       <TD width="304"> <font color="#000000">
                         <input type="checkbox" name="confirmation" value="yes" checked>
                         YES </font></TD>
                     </TR>
                     <TR>
                       <TD width="304"><b><font color="#000000">Please enter
                         a valid e-mail:</font></b></TD>
                       <TD width="304"> <font color="#000000">
                         <INPUT TYPE="text" NAME="email" SIZE="35" value="">
                         </font></TD>
                     </TR>
                   </TABLE>
                     
                   <hr width="90%" align="left">
                     
                   <table width="90%" border="0">
                     <tr>
                         <td width="2%">
                           <input type="checkbox" name="verified" value="check re-order has been verified">
       </td>
                         <td width="98%">By checking the box to the left, I am
                           certifying that the above information is what I wish
                           to be printed on my checks. If I request order to
                           be reprinted, I will be charged for both orders, unless
                           above information is not what is printed on my checks.</td>
     </tr>
   </table>
                     
                   <hr width="90%" align="left">
                     <table width="84%" border="0" cellspacing="0">
                       <tr>
                         <td width="12%">
                           <input type="submit" value="Submit" name="submit">
                         </td>
                         <td width="88%">
                           <input type="reset" value="Reset" name="reset">
                         </td>
                       </tr>
                     </table>
<br>
<br>
</form>
               </td>
               <td width="25">&nbsp;</td>
             </tr>
             <tr>
               <td width="25" height="11">&nbsp;</td>
               <td height="11">&nbsp;</td>
               <td width="25" height="11">&nbsp;</td>
             </tr>
           </table>
         </td>
         <td width="18" height="300" bgcolor="#E5E2DB">&nbsp;</td>
         <td width="1" bgcolor="#ADABA2"> <img border="0" src="images/spacer.gif" width="2" height="1"></td>
       </tr>
     </table>
   </td>
 </tr>
</table>
<br>
<?
}


if ($_SESSION['content_editor']){content_mgmt_toolbar($content_id);}


include $_SERVER['DOCUMENT_ROOT']."/includes/footer.php";
?>


This post has been edited by j-rah: Dec 23 2005, 07:17 PM
Go to the top of the page
 
+Quote Post
usr.c
post Dec 23 2005, 07:37 PM
Post #2


Boss, my code's compiling (xkcd)
Group Icon

Group: Admins
Posts: 10,440
Joined: 19-September 01
Member No.: 1

Nothing Selected




If you get a blank page then maybe errors are being written to the log instead of to the screen. You might want to temporarily change that.

Also, you've got an else statement on line 147, but I can't see where the if statement is.

CODE
}
else
{


--------------------


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com
Go to the top of the page
 
+Quote Post
j-rah
post Dec 23 2005, 07:40 PM
Post #3


SuperNova II Member
Group Icon

Group: Moderators
Posts: 1,197
Joined: 19-November 03
Member No.: 694

Switzerland

Bubble Trouble Champion!
Blackjack 2 Champion!



I'll try it.

QUOTE(usr.c @ Dec 23 2005, 02:37 PM)
If you get a blank page then maybe errors are being written to the log instead of to the screen.  You might want to temporarily change that.
*


How would I go about doing that?
Go to the top of the page
 
+Quote Post
usr.c
post Dec 23 2005, 09:43 PM
Post #4


Boss, my code's compiling (xkcd)
Group Icon

Group: Admins
Posts: 10,440
Joined: 19-September 01
Member No.: 1

Nothing Selected




You'll need to update the following entries in your php.ini file:

display_errors
log_errors
error_log

Set the first one to On to display errors and then restart PHP. Let me know if you have any problems.


--------------------


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd May 2013 - 10:09 AM