Login form no longer working

Joined
Feb 17, 2023
Messages
1
Reaction score
0
Hi, a previous developer set up a login page that would then should a technical downloads page, however all of a sudden when you subit your details it just refreshes the login page rather than going to the downloads page. This is the code below, I am not really a developer but I found this in the theme settings and I cant get access to our hosting etc.

<?php
/*
Template Name: Tech Hub Template
*/
$pageTemplate = 'default-page';
include(locate_template('/inc/header.php')); ?>

<?php include(locate_template('/inc/in-page-banner.php')); ?>

<div id="<?php echo trim(strtolower(str_replace(" ", "-", get_the_title()))); ?>" class="row main-content">
<div class="grid two-thirds">
<?php if (isset($_COOKIE['has_verified_access']) || is_user_logged_in()) : ?>
<?php if (get_field('download_categories')) : while (has_sub_field('download_categories')) : ?>
<?php if (get_sub_field('category_name') || get_sub_field('category_logo')) : ?>
<h3 class="techhub-title">
<?php if ($categoryImage = get_sub_field('category_logo')) : ?>
<img src="<?php echo $categoryImage['sizes']['thumbnail']; ?>" alt=" ">
<?php endif; ?>
<?php if (get_sub_field('category_name')) : ?>
<?php the_sub_field('category_name'); ?>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if (get_sub_field('downloads')) : ?>
<div class="techhub-download-grid" style="border-color: <?php echo get_sub_field('download_border_colour') ? get_sub_field('download_border_colour') : '#646363'; ?>;">
<?php while (has_sub_field('downloads')) : $file = get_sub_field('file'); ?>
<a href="<?php echo $file['url']; ?>" target="_blank" class="techhub-download-item">
<?php if ($downloadIcon = get_sub_field('icon')) : ?>
<img src="<?php echo $downloadIcon['sizes']['medium']; ?>" alt=" ">
<?php endif; ?>
<span><?php the_sub_field('title'); ?></span>
</a>
<?php endwhile; ?>
</div>
<?php endif; ?>

<?php if (get_field('follow_up_text')) : ?>
<div class="techhub-follow-up">
<?php the_field('follow_up_text'); ?>
</div>
<?php endif; ?>
<?php endwhile;
endif; ?>
<?php else : ?>
<p style="display: block; background: #eee; padding: 10px; border-radius: 2px;"><i class="fal fa-info-circle"></i> By submitting the below form you consent to Access2 Ltd processing your information in accordance with our privacy policy which can be found <a target="_blank" href="http://access2.com/privacypolicy/">here</a>.<p>
<form action="/wp-content/themes/Access2Theme/inc/tech-signup.php" method="POST" class="technical-form">
<?php if (isset($_REQUEST['error'])) : ?>
<p style="color: red; font-weight: bold;">Please ensure you enter the required fields below to proceed.</p>
<?php else : ?>
<p style="font-weight: bold;">In order to get access to the Technical Hub, please provide your name and email address details below.</p>
<?php endif; ?>
<label for="name"><i class="fal fa-user"></i> Your name*</label>
<input type="text" name="name">

<label for="email"><i class="fal fa-envelope"></i> Your email address*</label>
<input type="email" name="email">
<div class="button-container">
<button class="btn btn-primary" role="submit">Get Access <i class="fal fa-lock"></i><i class="fal fa-unlock"></i></button>
</div>
</form>
<?php endif; ?>
</div>
<div class="grid one-third">
<?php include(locate_template('/inc/links-sidebar.php')); ?>
<?php include(locate_template('/inc/product-sidebar.php')); ?>
</div>
</div>

<?php include(locate_template('/inc/footer.php')); ?>
 
Joined
Nov 13, 2020
Messages
302
Reaction score
38
The form looks good to me. So, if you haven't done anything to your code that would have caused this, ask your provider if they made a change or update to the PHP version.
 
Joined
Jul 12, 2020
Messages
89
Reaction score
9
Try this!
Change the following line of code:
Code:
<div id="<?php echo trim(strtolower(str_replace(" ", "-", get_the_title()))); ?>" class="row main-content">
to this:
Code:
<div id="<?php echo trim(strtolower(str_replace(\" \", \"-\", get_the_title()))); ?>" class="row main-content">
or this:
Code:
<?php techID = trim(strtolower(str_replace(" ", "-", get_the_title()))); ?>
<div id="<? phptechID; ?>" class="row main-content">
and see what happens...
it's been a while since I've worked with php. Seems this is just more word press garbage that everyone talks about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top