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 Coder
    Join Date
    Mar 2011
    Location
    Oudtshoorn South Africa
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Integrating css page into another css page

    I have a website in css www.southcape-ads.co.za on the getlisted page i want to give the people the ablility to upload photos and email it to me. I downloaded a email form in css with all that what i need.
    I would like to keep my getlisted page intact but add the photo email part underneath the existing email form in the middle of the page. /The existing email form can go. I cant just past it because its a .php file using contact.css and needs to activate other files.
    The original page works of Style.css.
    Not sure how to go about it. please help. css knolegde still very limitted.
    the contactform.php and below this my getlisted.html page
    Code:
    <?PHP
    /*
        Contact Form from HTML Form Guide
        This program is free software published under the
        terms of the GNU Lesser General Public License.
        See this page for more info:
        http://www.html-form-guide.com/contact-form/contact-form-attachment.html
    */
    require_once("./include/fgcontactform.php");
    require_once("./include/captcha-creator.php");
    
    $formproc = new FGContactForm();
    $captcha = new FGCaptchaCreator('scaptcha');
    
    $formproc->EnableCaptcha($captcha);
    
    //1. Add your email address here.
    //You can add more than one receipients.
    $formproc->AddRecipient('kees@southcape-ads.co.za'); //<<---Put your email address here
    
    
    //2. For better security. Get a random tring from this link: http://tinyurl.com/randstr
    // and put it here
    $formproc->SetFormRandomKey('XsHVufPpgD9Epwl');
    
    $formproc->AddFileUploadField('photo1','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo2','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo3','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo4','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo5','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo6','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo7','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo8','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo9','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo10','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo11','jpg,jpeg,gif,png,bmp',2024);
    $formproc->AddFileUploadField('photo12','jpg,jpeg,gif,png,bmp',2024);
    
    if(isset($_POST['submitted']))
    {
       if($formproc->ProcessForm())
       {
            $formproc->RedirectToURL("thank-you.php");
       }
    }
    
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
          <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
          <title>Contact us</title>
          <link rel="STYLESHEET" type="text/css" href="contact.css" />
          <script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
          <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script>
    	  
    </head>
    <body>
    
    <!-- Form Code Start -->
    <form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' enctype="multipart/form-data" accept-charset='UTF-8'>
    
    <fieldset >
    <legend>Contact us</legend>
    
    <input type='hidden' name='submitted' id='submitted' value='1'/>
    <input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
    <input type='text'  class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />
    
    <div class='short_explanation'>* required fields</div>
    
    <div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div>
    <div class='container'>
        <label for='name' >Your Full Name*: </label><br/>
        <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
        <span id='contactus_name_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='name' >Business Name*: </label><br/>
        <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
        <span id='contactus_name_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='name' >Business Address*: </label><br/>
        <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
        <span id='contactus_name_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='name' >Business Phone Number*: </label><br/>
        <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
        <span id='contactus_name_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='name' >Cell Phone Number*: </label><br/>
        <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
        <span id='contactus_name_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='email' >Email Address*:</label><br/>
        <input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/>
        <span id='contactus_email_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='message' >Message:</label><br/>
        <span id='contactus_message_errorloc' class='error'></span>
        <textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea>
    </div>
    <div class='container'>
        <label for='photo' >photo1:</label><br/>
        <input type="file" name='photo1' id='photo1' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo2:</label><br/>
        <input type="file" name='photo2' id='photo2' /><br/>
        <span id='contactus_resume_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo3:</label><br/>
        <input type="file" name='photo3' id='photo3' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo4:</label><br/>
        <input type="file" name='photo4' id='photo4' /><br/>
        <span id='contactus_resume_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo5:</label><br/>
        <input type="file" name='photo5' id='photo5' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo6:</label><br/>
        <input type="file" name='photo6' id='photo6' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo7:</label><br/>
        <input type="file" name='photo7' id='photo7' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo8:</label><br/>
        <input type="file" name='photo8' id='photo8' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo9:</label><br/>
        <input type="file" name='photo9' id='photo9' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo10:</label><br/>
        <input type="file" name='photo10' id='photo10' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo11:</label><br/>
        <input type="file" name='photo11' id='photo11' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <label for='photo' >photo12:</label><br/>
        <input type="file" name='photo12' id='photo12' /><br/>
        <span id='contactus_photo_errorloc' class='error'></span>
    </div>
    <div class='container'>
        <div><img alt='Captcha image' src='show-captcha.php?rand=1' id='scaptcha_img' /></div>
        <label for='scaptcha' >Enter the code above here:</label>
        <input type='text' name='scaptcha' id='scaptcha' maxlength="10" /><br/>
        <span id='contactus_scaptcha_errorloc' class='error'></span>
        <div class='short_explanation'>Can't read the image?
        <a href='javascript: refresh_captcha_img();'>Click here to refresh</a>.</div>
    </div>
    
    
    <div class='container'>
        <input type='submit' name='Submit' value='Submit' />
    </div>
    
    </fieldset>
    </form>
    <!-- client-side Form Validations:
    Uses the excellent form validation script from JavaScript-coder.com-->
    
    <script type='text/javascript'>
    // <![CDATA[
    
        var frmvalidator  = new Validator("contactus");
        frmvalidator.EnableOnPageErrorDisplay();
        frmvalidator.EnableMsgsTogether();
        frmvalidator.addValidation("name","req","Please provide your name");
    
        frmvalidator.addValidation("email","req","Please provide your email address");
    
        frmvalidator.addValidation("email","email","Please provide a valid email address");
    
        frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");
    
        frmvalidator.addValidation("photo","file_extn=jpg;jpeg;gif;png;bmp","Upload images only. Supported file types are: jpg,gif,png,bmp");
    
        frmvalidator.addValidation("scaptcha","req","Please enter the code in the image above");
    
        document.forms['contactus'].scaptcha.validator
          = new FG_CaptchaValidator(document.forms['contactus'].scaptcha,
                        document.images['scaptcha_img']);
    
        function SCaptcha_Validate()
        {
            return document.forms['contactus'].scaptcha.validator.validate();
        }
    
        frmvalidator.setAddnlValidationFunction("SCaptcha_Validate");
    
        function refresh_captcha_img()
        {
            var img = document.images['scaptcha_img'];
            img.src = img.src.substring(0,img.src.lastIndexOf("?")) + "?rand="+Math.random()*1000;
        }
    
    // ]]>
    </script>
    
    
    </body>
    </html>
    Getlisted.html page
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html><head>
      <title>South Cape Advertising </title>  
        <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>
    <div id="site">
    <div id="wrapper">
    <div id="header"> <a href="index.html" id="logo"><img src="images/spacer.gif" alt="" height="90" width="360"></a>
    <ul id="menu">
      <li><a href="index.html" class="but1">Home</a></li>
      <li><a href="getlisted.html" class="but2_active">Get Listed</a></li>
      <li><a href="newlistings.html" class="but3">Newest Listings</a></li>
      <li><a href="referrals.html" class="but4">Refer a Business</a></li>
      <li><a href="rateus.html" class="but5">Rate Us</a></li>
      <li><a href="stats.html" class="but6">Statistics</a></li>
      <li><a href="contact.html" class="but7">Contact Us</a></li>
    </ul>
    <div class="logo">THE
    FUTURE OF SUCCESSFUL BUSINESS IS TO HAVE IT DISPLAYED ON THE INTERNET
    AND ALLOW POTENTIAL CUSTOMERS TO SEE WHAT YOUR BUSINESS HAVE TO OFFER.</div>
    <span class="text">Top
    </span> </div>
    <div id="content">
    <div id="sidebar">
    <h4>Resources</h4>
    <ul>
      <li><a href="accommodation.html">Accommodation</a></li>
      <li><a href="accounting.html">Accounting</a></li>
      <li><a href="antiques.html">Antiques and Curio's</a></li>
      </ul>
    <br>
    <br>
    <span style="font-weight: bold;">2.
    &nbsp;WELCOME TO SOUTH CAPE ADVERTISING OFFER<br>
    YOUR Listing plus Link to your website Normal Price R500.00<br>
    <font color="#cc0000"> NOW ONLY</font>&nbsp; R300.00 FOR WHOLE YEAR<br>
    (Less than R1.00 a Day)<br>
    </span>&nbsp; &nbsp; &nbsp;<span style="font-weight: bold;">&nbsp;
    <h2>SUPPLY ALL RELEVANT INFO FOR YOUR ADD LISTING</h2>
    <br>
    <form action="http://www.SnapHost.com/captcha/send.aspx" id="ContactUsCaptchaWebForm" method="post" onsubmit="return ValidateForm(this);"> <input id="skip_WhereToSend" name="skip_WhereToSend" value="support@southcape-ads.co.za" type="hidden"><input id="skip_SnapHostID" name="skip_SnapHostID" value="R23LFZYEWMPU" type="hidden"> <input id="skip_WhereToReturn" name="skip_WhereToReturn" value="http://www.southcape-ads.co.za/ThankYouPage.html" type="hidden"><input id="skip_Subject" name="skip_Subject" value="Contact Us Form" type="hidden"> <input id="skip_ShowUsersIp" name="skip_ShowUsersIp" value="1" type="hidden"><input id="skip_SendCopyToUser" name="skip_SendCopyToUser" value="1" type="hidden">
      <script type="text/javascript">
    function ValidateForm(frm) {
    if (frm.FirstName.value == "") {alert('First name is required.');frm.FirstName.focus();return false;}
    if (frm.LastName.value == "") {alert('Last name is required.');frm.LastName.focus();return false;}
    if (frm.FromEmailAddress.value == "") {alert('Email address is required.');frm.FromEmailAddress.focus();return false;}
    if (frm.FromEmailAddress.value.indexOf("@") < 1 || frm.FromEmailAddress.value.indexOf(".") < 1) {alert('Please enter a valid email address.');frm.FromEmailAddress.focus();return false;}
    if (frm.Comments.value == "") {alert('Please enter comments or questions.');frm.Comments.focus();return false;}
    if (frm.skip_CaptchaCode.value == "") {alert('Enter web form code.');frm.skip_CaptchaCode.focus();return false;}
    return true; }
    function ReloadCaptchaImage(captchaImageId) {
    var obj = document.getElementById(captchaImageId);
    var src = obj.src;
    var date = new Date();
    var pos = src.indexOf('&rad=');
    if (pos >= 0) { src = src.substr(0, pos); }
    obj.src = src + '&rad=' + date.getTime();
    return false; }
      </script>
      <table border="0" cellpadding="5" cellspacing="0" width="520">
        <tbody>
          <tr>
            <td style="width: 50%;">First Name*:<br>
            <input id="FirstName" name="FirstName" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td style="width: 50%;">Surname*:<br>
            <input id="LastName" name="LastName" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
            <td>Email Address*:<br>
            <input id="FromEmailAddress" name="FromEmailAddress" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>Work Phone :<br>
            <input id="WorkPhoneNumber" name="WorkPhoneNumber" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td>Fax Number:<br>
            <input id="FaxNumber" name="FaxNumber" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
            <td>HomePhone :<br>
            <input id="HomePhoneNumber" name="HomePhoneNumber" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td>Mobile Phone :<br>
            <input id="MobilePhoneNumber" name="MobilePhoneNumber" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
            <td colspan="2">Address:<br>
            <input id="Address" name="Address" maxlength="250" style="border: 1px solid rgb(0, 153, 0); width: 480px;" type="text"></td>
          </tr>
          <tr>
            <td>Town:<br>
            <input id="City" name="City" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td>Province:<br>
            <input id="State" name="State" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
            <td>Postal Code:<br>
            <input id="Country" name="Country" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
          </tr>
          <tr>
            <td>HomePhone :<br>
            <input id="HomePhoneNumber" name="HomePhoneNumber" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td>Mobile Phone :<br>
            <input id="MobilePhoneNumber" name="MobilePhoneNumber" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
            <td colspan="2">Business Address:<br>
            <input id="Address" name="Address" maxlength="250" style="border: 1px solid rgb(0, 153, 0); width: 480px;" type="text"></td>
          </tr>
          <tr>
            <td>Town:<br>
            <input id="City" name="City" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td>Province:<br>
            <input id="State" name="State" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
            <td>Postal Code:<br>
            <input id="Country" name="Country" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
            <td>Advertising Package 1 or 2 <br>
            <input id="Zip" name="Zip" maxlength="60" style="border: 1px solid rgb(0, 153, 0); width: 240px;" type="text"></td>
          </tr>
          <tr>
            <td colspan="2">Comments and Questions*:<br>
            <textarea name="Comments" id="Comments" rows="7" cols="40" style="border: 1px solid rgb(0, 153, 0); width: 500px;"></textarea></td>
          </tr>
          <tr>
            <td colspan="2" align="center"> <br>
            <table border="0" cellpadding="0" cellspacing="0">
              <tbody>
                <tr>
                  <td colspan="2" style="padding-bottom: 18px;"><!-- Please check our ProCaptcha service which is ad-free:
    
    http://www.SnapHost.com/captcha/ProCaptchaOverview.aspx -->
                  <a href="http://www.SnapHost.com/captcha/" style="text-decoration: none; font-size: 11px; font-family: Verdana,Arial,Helvetica; color: rgb(0, 0, 153);">This
    web form is protected from SPAM by <span style="text-decoration: underline;">SnapHost.com</span></a></td>
                </tr>
                <tr valign="top">
                  <td> <i>Enter web form code*:</i> <input id="skip_CaptchaCode" name="skip_CaptchaCode" style="border: 1px solid rgb(153, 153, 153); width: 80px;" maxlength="6" type="text"></td>
                  <td><a href="http://www.SnapHost.com"><img id="CaptchaImage" alt="Web Form Code" title="Anti-spam web forms" style="border: 1px solid rgb(153, 153, 153); margin-left: 20px;" src="http://www.SnapHost.com/captcha/CaptchaImage.aspx?id=R23LFZYEWMPU&amp;ImgType=2"></a><br>
                  <a href="#" onclick="return ReloadCaptchaImage('CaptchaImage');"><span style="font-size: 12px;">reload image</span></a> </td>
                </tr>
              </tbody>
            </table>
            <br>
    * - required fields. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input id="skip_Submit" name="skip_Submit" value="Submit" type="submit"></td>
          </tr>
        </tbody>
      </table>
      <br>
    </form>
    <div>
    <div>
    <div> </div>
    </div>
    </div>
    </div>
    <div id="footer">
    <ul>
      <li><a href="index.html" class="but1">Home</a></li>
      </ul>
    sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="border: 0pt none ; width: 88px; height: 31px;" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a></p>
    </div>
    </div>
    </div>
    
    </body></html>
    Last edited by keesmarcha; 02-12-2012 at 06:50 PM.

  • #2
    New Coder
    Join Date
    Feb 2012
    Location
    England
    Posts
    77
    Thanks
    0
    Thanked 12 Times in 11 Posts
    What is it actually you want to do?

    An email form, or something that allows people to upload photos? Prehaps try to explain with more full stops and in detail.

  • #3
    New Coder
    Join Date
    Mar 2011
    Location
    Oudtshoorn South Africa
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi,
    I got my Website with a getlisted link. When the get listed link opens there is a email form with Capcha witch works fine. I need for people to upload pictures to me. I downloaded a Php (css) page and i reconstructed the outlay and made it to upload 12 photos at a time. On its own it works fine and does every i want.
    Now i want to put this upload page under the Email form so once they have send me their info they can also send me their photos.
    But because this is two seperate webpages (one uses style.css to open and the other contact.css)
    I dont know how to make it one page with every thing on it so that both te systems work together.
    Hope this helps. the example is that of the listed page and the Photo upload page. I took some unneccary typing out for the message to be axcepted by coding forums.
    Thanks Kees

  • #4
    New Coder
    Join Date
    Feb 2012
    Location
    England
    Posts
    77
    Thanks
    0
    Thanked 12 Times in 11 Posts
    If you want people to be able to send you photos I suggest getting a free email script. You could make it so the attachment was their photo. Hope that helps.

  • #5
    New Coder
    Join Date
    Mar 2011
    Location
    Oudtshoorn South Africa
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I've got a Email Script on my Getlisted.html link. Works fine.
    Downloaded css php Script for the photos. change the php to accept 12 Photos and it works fine.
    I want to intergrate the Photo scritp into my Getlisted.html page.
    The problem.
    The Getlisted.html page uses Style.css for its outlay. The Photo page uses Contact.css
    I dont know how to combine the two css files to make one outlay that still looks like the original Getlisted page, you can look at my site www.southcape-ads.co.za and just click
    Get Listed at the top.
    You wil see the Email form it works fine. Underneath the email you will find
    TO UPLOAD YOUR ADVERT PHOTOS CLICK HERE with a link to the Photo upload page.
    That is the page i want to put underneath the Email.
    Hope this helps Kees


  •  

    Posting Permissions

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