Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Parse error: syntax error, unexpected '{' in /buy.php on line 33

    Hi, I'm trying to figure out why I'm getting the error:

    Parse error: syntax error, unexpected '{' in /buy.php on line 33

    But I can't figure it out. I have all my { closed with } and I can't find what is missing. Any ideas?

    Here is my code:

    Code:
    <style type="text/css">
    <!--
    
    #wall_maintable {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 10px;
    	font-style: normal;
    	float: left;
    	width: 320px;
    	position: fixed;
    	left: 0px;
    	top: 0px;
    }
    body {
    	background-color: #000000;
    }
    .style1 {
    	font-family: Helvetica, Verdana, Arial, sans-serif;
    	color: #FFCC00;
    	font-weight: bold;
    	font-size: 12px;
    }
    .style2 {color: #FFFFFF}
    #form_table {
    	font-family: Helvetica, Verdana, Arial, sans-serif;
    	position: relative;
    	width: 90%;
    }
    .style3 {color: #FFFFFF; font-size: 9px; }
    -->
    </style>
    <?php 
    if ((isset($_POST['activator'])) {
    		$errormsg = 0;
    	    
    		if(($_POST['posFirstName'] == "") or ($_POST['posLastName'] == "") or ($_POST['posEmail'] == "") or ($_POST['posPixelRequest'] == "")) {
                $errormsg = 1;
            }
    		
    		if ($errormsg == 0) {
    
                $posFirstName = $_POST['posFirstName'];
    	    	$posFirstName = $_POST['posLastName'];
    		    $posEmail = $_POST['posEmail'];
        		$posCompany = $_POST['posCompany'];
                $posPhone = $_POST['posPhone'];
    		    $posPixelRequest = $_POST['posPixelRequest'];
        		$posText = $_POST['posText'];
                $emailmessage = "You have received a submission from your pixel request form.
    Name: $posFirstName $posLastName
    Company: $posCompany
    Phone Number: $posPhone
    E-mail: $posEmail
    Pixels Requested: $posPixelRequest
    Additional Information: $posText
            ";
    
    
                //Defining mail settings
    
                $to = "webmaster@theonemilliondollariphone.com";
                $subject = "Pixel Request";
                $headers = "From: $posEmail";
                mail($to,$subject,$emailmessage,$headers);
    		}
    }
    ?>
    <div class="style1" id="wall_maintable">
      <p>Buying pixels of history</p>
    
    	<?php if(isset($_POST['activator']) and ($errormsg == "0"))  {
        
        echo('<p class=style2>Thank you for your interest! Your Email has been sent and we will contact you in less than 24 hours with all the information necessary to complete your purchase.</p>');
        
        } else {
    	   if ($errormsg == 1) {
    	   		echo('<p class="style2" style="color:red;">Name, E-mail and How many pixels you want are required fields. Please fill in all fields and send it again.</p>');
    	   }
    	   echo('<p class="style2">You can be a part of the Internet history. Every pixel on the screen of The One Million Dollar iPhone application is available for				         sale in 10x10 blocks and the price is $1.00/pixel. Your image can be linked to a website or to a phone number. When the user tap your image he will be redirected.</p>
              <p class="style2">To order pixels you just need to fill the form bellow. We will contact you in less than 24 hours.</p>
              <div class="form_table" id="form_table"><form action="" method="post" id="contact">
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td colspan="2" class="style1">Name:</td>
                  </tr>
                  <tr>
                    <td>
                      <input type="text" name="posFirstName" id="posFirstName" size="10"></td>
                    <td><input type="text" name="posLastName" id="posLastName" size="15"></td>
                  </tr>
                  <tr>
                    <td><span class="style3">First Name</span></td>
                    <td class="style3">Last Name</td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td class="style1">Company Name:</td>
                  </tr>
                  <tr>
                    <td><input type="text" name="posCompany" id="posCompany" size="30">        </td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td class="style1">Phone Number:</td>
                  </tr>
                  <tr>
                    <td><input name="posPhone" id="posPhone" type="text" size="30">        </td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td class="style1">E-mail:</td>
                  </tr>
                  <tr>
                    <td><input name="posEmail" id="posEmail" type="text" size="30">        </td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td class="style1">How many pixels do you want?</td>
                  </tr>
                  <tr>
                    <td><input name="posPixelRequest" id="posPixelRequest" type="text" size="30">        </td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
                  <tr>
                    <td class="style1">Additional information</td>
                  </tr>
                  <tr>
                    <td><textarea cols="30" rows="5" name="posText" id="posText"></textarea>        </td>
                  </tr>
                </table><br /><input type="hidden" name=activator value=1><input class="submit" type="submit" name="sendContactEmail" id="sendContactEmail" value=" Send Information " />
                <br></form>
              </div>
              <p>Terms and Conditions</p>
              <ul>
                <li><span class="style2">Each pixel costs $1 and you must purchase in multiples of 10x10 (100) pixels.</span></li>
                <li><span class="style2">The purchase of pixels only give you the right to display your image and link in the respective space you bought.</span></li>
                <li><span class="style2">Images must be the exact size you have paid for, not more, not less.</span></li>
                <li><span class="style2">Images must be in JPEG, PNG or GIF format and can not be animated.</span></li>
                <li><span class="style2">Once the image is displayed on the Wall it cannot be changed any more.</span></li>
                <li><span class="style2">Once accepted and displayed on the Wall, you cannot get a refund.</span></li>
                <li><span class="style2">The application and website will be online for at least 10 years,  so at least until 26th August 2018, but the idea is to keep it live and updated indefinitely.</span></li>
                <li><span class="style2">No inappropriate images or content will be accepted. We reserve the right to deny or reject, at our sole and absolute discretion, any kind of content or image. </span></li>
                <li><span class="style2">If your image is accepted and you later change the content of the linked site to show inappropriate content,  your link will be removed until you provide a new one, and you will not get a refund  for the  downtime.</span></li>
                <li><span class="style2">If you submit an image or link that is rejected, you will have the opportunity to provide an alternative, otherwise your money will be refunded and you will lose your space.</span></li>
              </ul>');
      
        } ?>
      
    </div>

  • #2
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    Your problem is right here.

    Code:
    if ((isset($_POST['activator'])) {
    Change to

    Code:
    if (isset($_POST['activator'])) {
    Last edited by masterofollies; 09-03-2008 at 02:11 PM.

  • #3
    Super Moderator JohnDubya's Avatar
    Join Date
    Nov 2006
    Location
    Missouri
    Posts
    634
    Thanks
    12
    Thanked 18 Times in 18 Posts
    Why the extra parenthesis at the beginning? It's unnecessary. It should just simply be this:

    PHP Code:
    if (isset($_POST['activator'])) {
       


  • #4
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much. I knew it was something very simple and stupid

  • #5
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    Welcome


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •