Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter Finnaus

    (@finnaus)

    Thank you very much Andrew! Just a quick question, it’s fine if you don’t know the answer: when I submit the form, it is supposed to run the script, but instead I just get a 404 page not found..do you know how I would get this HTML form to run the script?

    Thread Starter Finnaus

    (@finnaus)

    EDIT

    This is the HTML code I’m using:

    <?php
    /*
    Template Name: About
    */
    php?>
    <html>
    <head>
    <title>About</title>
    </head>
    <div style="position: absolute; top:80px; left:700px">
    <link rel="stylesheet" type="text/css" href="https://realmccoyspirits.com/wp-content/themes/twentytwelve/background.css">
    <div class="aboutpaper">
      <img alt="" src="https://realmccoyspirits.com/wp-content/uploads/2012/12/McCoyWebAboutFuturaNoBG.png" width="400" hight="600" >
    </div>
    </font>
    </html>

    And this is the CSS I’m using:

    .aboutpaper
    {
    position:static;
    }
    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Oh, I just realized one more thing, is it possible to have the main page not be the post page? I’m wanting to have my about page as the main page.
    If not it is fine!

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    And I answered my second question as well!

    Thank you so much Dandy! If you would like to see the final product of all of your amazing work, you can go to realmccoyspirits.com!

    Thank you so much!

    -Finn

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Wait, I figured out the answer to my first question, I didn’t have twenty twelve activated XD

    But my second question still stands.

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    So it seems to be working!

    Just a couple things, that (I think) will be an easy fix.

    1. when I redirects to the main page, it’s all in basic HTML.

    2. when you’re not 21, it still just redirects you to the main page, is there a code I should put under `<?php } else { ?>
    This is where all the code goes for someone who’s too young
    <?php }; ?>
    <?php } else { ?>`
    to redirect to a “to young” page or what?

    Thanks so much, I’m really glad it’s working:D

    -Finn

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Damn, I’m getting a syntax error on line 261 of the header (the last line of the header)
    and a syntax error on line 23 of the footer….By the way, I’m using the wordpress theme twentytwelve, I don’t know if that matters or not.

    But here’s the code in the header:

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    ?><!DOCTYPE html>
    <!--[if IE 7 | IE 8]>
    <html class="ie" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="https://gmpg.org/xfn/11" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    <?php wp_head(); ?>
    </head>
    <?php if (!(isset($_COOKIE["AgeVerify"]))) { ?>
    <?php if($_POST['submitted'] != "") { ?>
    
    <?php 
    
    $minimumagetoviewsite = 21;
    $birthmonth = $_POST['month'];
    $birthdate = $_POST['date'];
    $birthyear = $_POST['year'];
    $todaysmonth = date("n");
    $todaysdate = date("j");
    $todaysyear = date("Y"); 
    
    if(($birthyear + $minimumagetoviewsite)<$todaysyear) {
    $yearcheck = "okay";
    } else if(($birthyear + $minimumagetoviewsite)>$todaysyear) {
    $yearcheck = "no";
    } else {
    $yearcheck = "same";
    }
    if($birthmonth < $todaysmonth) {
    $monthcheck = "okay";
    } else if($birthmonth > $todaysmonth) {
    $monthcheck = "no";
    } else {
    $monthcheck = "same";
    }
    if($birthdate <= $todaysdate) {
    $datecheck = "okay";
    } else {
    $datecheck = "no";
    };
    if ($yearcheck=="okay") {
    $agecheck = "pass";
    } else if ($yearcheck=="no") {
    $agecheck = "fail";
    } else {
    if ($monthcheck=="okay") {
    $agecheck = "pass";
    } else if ($monthcheck=="no") {
    $agecheck = "fail";
    } else {
    if ($datecheck=="okay") {
    $agecheck = "pass";
    } else if ($datecheck=="no") {
    $agecheck = "fail";
    }
    }
    }
    
    if($agecheck=="pass") { ?>
    
    <?php setcookie("AgeVerify", $value, time()+3600); ?>
    
    <?php } else { ?>
    
    This is where all the code goes for someone who's too young
    
    <?php }; ?>
    
    <?php } else { ?>
    <div style="position: absolute; bottom: 150px; right: 300px">
    <form method="post" action="">
    <select name="month">
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
    <option>6</option>
    <option>7</option>
    <option>8</option>
    <option>9</option>
    <option>10</option>
    <option>11</option>
    <option>12</option>
    </select>
    <select name="date">
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
    <option>6</option>
    <option>7</option>
    <option>8</option>
    <option>9</option>
    <option>10</option>
    <option>11</option>
    <option>12</option>
    <option>13</option>
    <option>14</option>
    <option>15</option>
    <option>16</option>
    <option>17</option>
    <option>18</option>
    <option>19</option>
    <option>20</option>
    <option>21</option>
    <option>22</option>
    <option>23</option>
    <option>24</option>
    <option>25</option>
    <option>26</option>
    <option>27</option>
    <option>28</option>
    <option>29</option>
    <option>30</option>
    <option>31</option>
    </select>
    <select name="year">
    <option>1920</option>
    <option>1921</option>
    <option>1922</option>
    <option>1923</option>
    <option>1924</option>
    <option>1925</option>
    <option>1926</option>
    <option>1927</option>
    <option>1928</option>
    <option>1929</option>
    <option>1930</option>
    <option>1931</option>
    <option>1932</option>
    <option>1933</option>
    <option>1934</option>
    <option>1935</option>
    <option>1936</option>
    <option>1937</option>
    <option>1938</option>
    <option>1939</option>
    <option>1940</option>
    <option>1941</option>
    <option>1942</option>
    <option>1943</option>
    <option>1944</option>
    <option>1945</option>
    <option>1946</option>
    <option>1947</option>
    <option>1948</option>
    <option>1949</option>
    <option>1950</option>
    <option>1951</option>
    <option>1952</option>
    <option>1953</option>
    <option>1954</option>
    <option>1955</option>
    <option>1956</option>
    <option>1957</option>
    <option>1958</option>
    <option>1959</option>
    <option>1960</option>
    <option>1961</option>
    <option>1962</option>
    <option>1963</option>
    <option>1964</option>
    <option>1965</option>
    <option>1966</option>
    <option>1967</option>
    <option>1968</option>
    <option>1969</option>
    <option>1970</option>
    <option>1971</option>
    <option>1972</option>
    <option>1973</option>
    <option>1974</option>
    <option>1975</option>
    <option>1976</option>
    <option>1977</option>
    <option>1978</option>
    <option>1979</option>
    <option>1980</option>
    <option>1981</option>
    <option>1982</option>
    <option>1983</option>
    <option>1984</option>
    <option>1985</option>
    <option>1986</option>
    <option>1987</option>
    <option>1988</option>
    <option>1989</option>
    <option>1990</option>
    <option>1991</option>
    <option>1992</option>
    <option>1993</option>
    <option>1994</option>
    <option>1995</option>
    <option>1996</option>
    <option>1997</option>
    <option>1998</option>
    <option>1999</option>
    <option>2000</option>
    <option>2001</option>
    <option>2002</option>
    <option>2003</option>
    <option>2004</option>
    <option>2005</option>
    <option>2006</option>
    <option>2007</option>
    <option>2008</option>
    <option>2009</option>
    <option>2010</option>
    <option>2011</option>
    <option>2012</option>
    </select>
    <input type="hidden" name="submitted" value="yes">
    <input type="submit" name="submit" value="verify">
    </form>
    </div>
    <?php }} else { ; ?>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<header id="masthead" class="site-header" role="banner">
    		<hgroup>
    			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    		</hgroup>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<div class="skip-link assistive-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a></div>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->
    
    		<?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    		<?php endif; ?>
    	</header><!-- #masthead -->
    
    	<div id="main" class="wrapper">

    and here’s the code for the footer:

    <?php
    /**
     * The template for displaying the footer.
     *
     * Contains footer content and the closing of the
     * #main and #page div elements.
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    ?>
    	</div><!-- #main .wrapper -->
    	<footer id="colophon" role="contentinfo">
    		<div class="site-info">
    			<?php do_action( 'twentytwelve_credits' ); ?>
    			<a href="<?php echo esc_url( __( 'https://www.ads-software.com/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a>
    		</div><!-- .site-info -->
    	</footer><!-- #colophon -->
    </div><!-- #page -->
    
    <?php wp_footer(); ?>
    <?php }; ?>
    </body>
    </html>

    Thanks, again. If you can’t find out what the problem is thats fine, I’ll find another way!
    Thank you so much though, I’m really appreciating all the work you are doing for me ??

    -Finn

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Ugh, it’s still not working…..
    Sorry for taking up so much of your time.

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    This is the code I’m currently using:

    <?php
    /*
    Template Name: enter
    */
    ?>
    <?php if($_POST['submitted'] != "") { ?>
    
    <?php 
    
    $minimumagetoviewsite = 21;
    $birthmonth = $_POST['month'];
    $birthdate = $_POST['date'];
    $birthyear = $_POST['year'];
    $todaysmonth = date("n");
    $todaysdate = date("j");
    $todaysyear = date("Y"); 
    
    if(($birthyear + $minimumagetoviewsite)<$todaysyear) {
    $yearcheck = "okay";
    } else if(($birthyear + $minimumagetoviewsite)>$todaysyear) {
    $yearcheck = "no";
    } else {
    $yearcheck = "same";
    }
    if($birthmonth < $todaysmonth) {
    $monthcheck = "okay";
    } else if($birthmonth > $todaysmonth) {
    $monthcheck = "no";
    } else {
    $monthcheck = "same";
    }
    if($birthdate <= $todaysdate) {
    $datecheck = "okay";
    } else {
    $datecheck = "no";
    };
    if ($yearcheck=="okay") {
    $agecheck = "pass";
    } else if ($yearcheck=="no") {
    $agecheck = "fail";
    } else {
    if ($monthcheck=="okay") {
    $agecheck = "pass";
    } else if ($monthcheck=="no") {
    $agecheck = "fail";
    } else {
    if ($datecheck=="okay") {
    $agecheck = "pass";
    } else if ($datecheck=="no") {
    $agecheck = "fail";
    }
    }
    }
    
    if($agecheck=="pass") { ?>
    This is where all the code goes for someone who's old enough
    
    <?php } else { ?>
    
    This is where all the code goes for someone who's too young
    
    <?php }; ?>
    
    <?php } else { ?>
    <div style="position: absolute; bottom: 150px; right: 300px">
    <form method="post" action="https://realmccoyspirits.com/about/">
    <select name="month">
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
    <option>6</option>
    <option>7</option>
    <option>8</option>
    <option>9</option>
    <option>10</option>
    <option>11</option>
    <option>12</option>
    </select>
    <select name="date">
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
    <option>6</option>
    <option>7</option>
    <option>8</option>
    <option>9</option>
    <option>10</option>
    <option>11</option>
    <option>12</option>
    <option>13</option>
    <option>14</option>
    <option>15</option>
    <option>16</option>
    <option>17</option>
    <option>18</option>
    <option>19</option>
    <option>20</option>
    <option>21</option>
    <option>22</option>
    <option>23</option>
    <option>24</option>
    <option>25</option>
    <option>26</option>
    <option>27</option>
    <option>28</option>
    <option>29</option>
    <option>30</option>
    <option>31</option>
    </select>
    <select name="year">
    <option>1920</option>
    <option>1921</option>
    <option>1922</option>
    <option>1923</option>
    <option>1924</option>
    <option>1925</option>
    <option>1926</option>
    <option>1927</option>
    <option>1928</option>
    <option>1929</option>
    <option>1930</option>
    <option>1931</option>
    <option>1932</option>
    <option>1933</option>
    <option>1934</option>
    <option>1935</option>
    <option>1936</option>
    <option>1937</option>
    <option>1938</option>
    <option>1939</option>
    <option>1940</option>
    <option>1941</option>
    <option>1942</option>
    <option>1943</option>
    <option>1944</option>
    <option>1945</option>
    <option>1946</option>
    <option>1947</option>
    <option>1948</option>
    <option>1949</option>
    <option>1950</option>
    <option>1951</option>
    <option>1952</option>
    <option>1953</option>
    <option>1954</option>
    <option>1955</option>
    <option>1956</option>
    <option>1957</option>
    <option>1958</option>
    <option>1959</option>
    <option>1960</option>
    <option>1961</option>
    <option>1962</option>
    <option>1963</option>
    <option>1964</option>
    <option>1965</option>
    <option>1966</option>
    <option>1967</option>
    <option>1968</option>
    <option>1969</option>
    <option>1970</option>
    <option>1971</option>
    <option>1972</option>
    <option>1973</option>
    <option>1974</option>
    <option>1975</option>
    <option>1976</option>
    <option>1977</option>
    <option>1978</option>
    <option>1979</option>
    <option>1980</option>
    <option>1981</option>
    <option>1982</option>
    <option>1983</option>
    <option>1984</option>
    <option>1985</option>
    <option>1986</option>
    <option>1987</option>
    <option>1988</option>
    <option>1989</option>
    <option>1990</option>
    <option>1991</option>
    <option>1992</option>
    <option>1993</option>
    <option>1994</option>
    <option>1995</option>
    <option>1996</option>
    <option>1997</option>
    <option>1998</option>
    <option>1999</option>
    <option>2000</option>
    <option>2001</option>
    <option>2002</option>
    <option>2003</option>
    <option>2004</option>
    <option>2005</option>
    <option>2006</option>
    <option>2007</option>
    <option>2008</option>
    <option>2009</option>
    <option>2010</option>
    <option>2011</option>
    <option>2012</option>
    </select>
    <input type="hidden" name="submitted" value="yes">
    <input type="submit" name="submit" value="verify">
    </form>
    </div>
    <?php }; ?>
    <html>
    <body style="background: url('https://realmccoyspirits.com/wp-content/uploads/2012/12/McCoyWebOpenBlackBottleLineBlack2.jpg');">
    <style=bgcolor="#000000">

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    I can access it directly. This is so weird…..

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Ok so I had it redirect to /about and once I hit enter it still says 404 error even though after the url it says /about

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    nothing, it’s just the url of the website.

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Is there a place where I should put a URL to redirect to if $agecheck=pass or something?

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Nope, it still brings me to a 404 page not found…..

    Forum: Fixing WordPress
    In reply to: Enter Page
    Thread Starter Finnaus

    (@finnaus)

    Alright, so here’s what I think is happening.
    Weather you’re over 21 or not, it redirects you to a 404 page not found.
    I’m doing something wrong I know XD

    -Finn

Viewing 15 replies - 1 through 15 (of 18 total)