close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Mail form not working width php 8

Thread began 4/09/2021 1:33 am by Philippe | Last modified 4/15/2021 5:58 am by Ray Borduin | 81 views | 4 replies |

Philippe

Mail form not working width php 8

Hy,

I have several mail forms which work fine up to php 7.4.15 with or without attachments.

With PHP 8.02 the redirection does not work and the email body page appears and nothing changes.
Everything is ok up to php 7.4.15.

Philippe

Sign in to reply to this post

Ray BorduinWebAssist

Sounds like an error in the body file. If you view source on the page does it have the </body> tag? You might be able to find the line with the error by finding where the page stops. You might even see an error message to help track it down.

Sign in to reply to this post
Did this help? Tips are appreciated...

Philippe

Hy Ray,
Here is the body page source : it seem's to stop after the table tag, see below the full page who's on server.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body style="background-color: #fff;">
<div id="background" style="font-family: 'Times New Roman', Times, serif; background-color: #eee; padding: 20px; text-align: center; color: #B6B6B6; font-size: 10px; width:97%">
<div id="page" style="padding: 10px; width: 600px; margin: 0 auto; text-align: left; background-color: #fff; border: 1px solid #C0C0C0;">
<div id="contentWrapper" style="padding: 0px 2px 10px 2px;">
<div id="contentHeader" style="border: 1px solid #DDD; border-right-width: 0px; border-left-width: 0px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td style="font-family: 'Times New Roman', Times, serif; font-size: 14px; width: 100%; padding: 3px 3px 3px 3px; color: #000000; font-weight: bold;">Mail du site : Association du Foyer Culturel de Sarreguemines </td>
</tr>
<tr valign="top">
<td style="font-family: 'Times New Roman', Times, serif; font-size: 14px; padding: 3px; border-left: 1px solid #DDD; color: #000000;"> Envoyé le 12 avril 2021, 08h36</td>
</tr>
</table>
</div>
<div id="content" style="padding: 0px 10px 10px 0px;">
<table cellpadding="0" cellspacing="0" border="0">
// the code stoped here !

Body page source on server :
<?php
global $articles2020;
?>
<?php require_once('Connections/articles2020.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php
$param_site = new WA_MySQLi_RS("param_site",$articles2020,0);
$param_site->setQuery("SELECT site_name, mailcontact FROM design");
$param_site->execute();
?>
<?php
setlocale(LC_ALL, 'fr_FR');
$date = strftime(' %d %B %Y, %Hh%M');
?>
<?php
$remove = array();
$remove[] = "";
$remove[] = "x";
$remove[] = "y";

$removeBegins = array();
$removeBegins[] = "Security";

$removeEnds = array();
$removeEnds[] = "_x";
$removeEnds[] = "_y";

$removeIncludes = array();
$removeIncludes[] = "Security";
$removeIncludes[] = "submit";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body style="background-color: #fff;">
<div id="background" style="font-family: 'Times New Roman', Times, serif; background-color: #eee; padding: 20px; text-align: center; color: #B6B6B6; font-size: 10px; width:97%">
<div id="page" style="padding: 10px; width: 600px; margin: 0 auto; text-align: left; background-color: #fff; border: 1px solid #C0C0C0;">
<div id="contentWrapper" style="padding: 0px 2px 10px 2px;">
<div id="contentHeader" style="border: 1px solid #DDD; border-right-width: 0px; border-left-width: 0px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td style="font-family: 'Times New Roman', Times, serif; font-size: 14px; width: 100%; padding: 3px 3px 3px 3px; color: #000000; font-weight: bold;">Mail du site : <?php echo($param_site->getColumnVal("site_name")); ?> </td>
</tr>
<tr valign="top">
<td style="font-family: 'Times New Roman', Times, serif; font-size: 14px; padding: 3px; border-left: 1px solid #DDD; color: #000000;"> Envoyé le <?php echo utf8_encode($date); ?></td>
</tr>
</table>
</div>
<div id="content" style="padding: 0px 10px 10px 0px;">
<table cellpadding="0" cellspacing="0" border="0">
<?php
foreach( $_POST as $pkey => $pval ){
if (!RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes)) {
if (get_magic_quotes_gpc()) $pval = stripslashes((is_array($pval)?implode(", ",$pval):$pval));
?>
<tr valign="top">
<td style="font-family: 'Times New Roman', Times, serif; font-size: 12px;width: 80px; text-align: right; padding: 3px 10px 3px 3px; color: #000; font-weight: bold;"><?php echo(str_replace("_"," ",$pkey)); ?> :</td>
<td style="font-family: 'Times New Roman', Times, serif; font-size: 12px;padding: 3px; border-left: 1px solid #DDD; color: #000000;"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?></td>
</tr>
<?php
}
}
?>

</table> </div>
</div>
</div>
</div>
</body>
</html>

Sign in to reply to this post

Ray BorduinWebAssist

get_magic_quotes was removed in php 8. Just delete this line and I think that will fix it:

if (get_magic_quotes_gpc()) $pval = stripslashes((is_array($pval)?implode(", ",$pval):$pval));

Sign in to reply to this post
Did this help? Tips are appreciated...

Philippe

thank's à lot, everything works in php 8

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...