screadore
-
Posts
7 -
Joined
-
Last visited
Posts posted by screadore
-
-
Now it's working. Thank you guys I was just an idiot and didn't realize it wouldn't work unless it was on a host... LOL
-
right now I'm running it off my computer from PYcharm. Could that be the problem? I'll try uploading it online and seeing if that works
-
could you give me an example of what it looks like? I have several PHP files in the folder that may be linked to it. I'm using an HTML template so maybe they put it somewhere else?
-
So I've been trying to get my contact forms to work on my website and I cannot figure out where to change my email so when they submit it that it goes to my email. Along with another problem being when I click the submit button it does not show if it was submitted or if there was an error, etc. PLEASE HELP the code is below! I put my email address in the section where I thought it would be, but it doesn't seem to be working.
<?php header('Content-type: application/json'); require_once('php-mailer/PHPMailerAutoload.php'); // Include PHPMailer $mail = new PHPMailer(); $emailTO = $emailBCC = $emailCC = array(); // Enter Your Sitename $sitename = 'levo...'; // Enter your email addresses: @required $emailTO[] = array( 'email' => 'stefan@...', 'name' => 'Stefan' ); // Enable bellow parameters & update your BCC email if require. //$emailBCC[] = array( 'email' => 'stefan', 'name' => 'Stefan' ); // Enable bellow parameters & update your CC email if require. //$emailCC[] = array( 'email' => 'stefan@', 'name' => 'Stefan' ); // Enter Email Subject $subject = "Contact Us" . ' - ' . $sitename; // Success Messages $msg_success = "We have <strong>successfully</strong> received your message. We'll get back to you soon."; if( $_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST["cf_email"]) && $_POST["cf_email"] != '' && isset($_POST["cf_name"]) && $_POST["cf_name"] != '') { // Form Fields $cf_email = $_POST["cf_email"]; $cf_name = $_POST["cf_name"]; $cf_address = isset($_POST["cf_subject"]) ? $_POST["cf_subject"] : ''; $cf_address = isset($_POST["cf_address"]) ? $_POST["cf_address"] : ''; $cf_company = isset($_POST["cf_company"]) ? $_POST["cf_company"] : ''; $cf_date = isset($_POST["cf_date"]) ? $_POST["cf_date"] : ''; $cf_budget = isset($_POST["cf_budget"]) ? $_POST["cf_budget"] : ''; $cf_msg = isset($_POST["cf_msg"]) ? $_POST["cf_msg"] : ''; $honeypot = isset($_POST["form-anti-honeypot"]) ? $_POST["form-anti-honeypot"] : ''; $bodymsg = ''; if ($honeypot == '' && !(empty($emailTO))) { $mail->IsHTML(true); $mail->CharSet = 'UTF-8'; $mail->From = $cf_email; $mail->FromName = $cf_name . ' - ' . $sitename; $mail->AddReplyTo($cf_email, $cf_name); $mail->Subject = $subject; foreach( $emailTO as $to ) { $mail->AddAddress( $to['email'] , $to['name'] ); } // if CC found if (!empty($emailCC)) { foreach( $emailCC as $cc ) { $mail->AddCC( $cc['email'] , $cc['name'] ); } } // if BCC found if (!empty($emailBCC)) { foreach( $emailBCC as $bcc ) { $mail->AddBCC( $bcc['email'] , $bcc['name'] ); } } // Include Form Fields into Body Message $bodymsg .= isset($cf_name) ? "Contact Name: $cf_name<br><br>" : ''; $bodymsg .= isset($cf_email) ? "Contact Email: $cf_email<br><br>" : ''; $bodymsg .= isset($cf_subject) ? "Contact Email: $cf_subject<br><br>" : ''; $bodymsg .= isset($cf_address) ? "Contact Address: $cf_address<br><br>" : ''; $bodymsg .= isset($cf_company) ? "Company: $cf_company<br><br>" : ''; $bodymsg .= isset($cf_date) ? "Date: $cf_date<br><br>" : ''; $bodymsg .= isset($cf_budget) ? "Budget: $cf_budget<br><br>" : ''; $bodymsg .= isset($cf_msg) ? "Message: $cf_msg<br><br>" : ''; $bodymsg .= $_SERVER['HTTP_REFERER'] ? '<br>---<br><br>This email was sent from: ' . $_SERVER['HTTP_REFERER'] : ''; $mail->MsgHTML( $bodymsg ); $is_emailed = $mail->Send(); if( $is_emailed === true ) { $response = array ('result' => "success", 'message' => $msg_success); } else { $response = array ('result' => "error", 'message' => $mail->ErrorInfo); } echo json_encode($response); } else { echo json_encode(array ('result' => "error", 'message' => "Bot <strong>Detected</strong>.! Clean yourself Botster.!")); } } else { echo json_encode(array ('result' => "error", 'message' => "Please <strong>Fill up</strong> all required fields and try again.")); } }
Need help ASAP plz working on this large companies website and I can't figure this out.
in PHP Coding Help
Posted
Wordpress gave me the following error when uploading the this themeforest theme.
failed opening '/srv/htdocs/wp-content/themes/QuickFixWebiste(Wordpress)/../../../wp-admin/includes/class-walker-nav-menu-edit.php' for inclusion (include_path='.:/usr/local/php7.2/lib/php') in /srv/htdocs/wp-content/themes/QuickFixWebiste(Wordpress)/library/core/admin/edit-menu-walker.php
Can anyone tell me how to resolve this?
The source code in the edit-menu-walker.php on lines 1-4 is: