Yann63
-
Posts
6 -
Joined
-
Last visited
Posts posted by Yann63
-
-
Hello,
5 years ago I created a website with a MySQL database and PHP 5.6 scripting with Dreamweaver CS6.
Now I have to upgrade my pages to PHP 7.4.2 using Dreamweaver 2020 and using mysqli connection.How do I proceed to change my pages ? Do I have to rescript all my PHP pages or is there an easy way to adapt the pages.
Thank you for helping out a PHP dummy.
-
Thanks mate !
-
Hello
How can I add a specific font and fontsize to my mail body ?
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // Laat PHPMailer gebruik maken van een smtp server.
$mail->Host = "smtp.mijnhostingpartner.nl"; // SMTP server van Mijn Hosting Partner
$mail->SMTPAuth = true;
$mail->Username = 'webmaster@blackfeet.be'; // Een geldig emailadres wat aangemaakt is bij Mijn Hosting Partner
$mail->Password = 'yr2805'; // Het wachtwoord wat bij het emailadres hoort$mail->FromName=$_POST['NAAM'];
$mail->Sender=$_POST['EMAIL'];$mail->AddAddress("webmaster@blackfeet.be");
$mail->Subject = $subject;$mail->Body = $text;
$mail->IsHTML(true); //Opmaak van de email is in HTML
if(!$mail->Send())
{
echo "Error sending: " . $mail->ErrorInfo;;
}echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?> -
Well, there are lots of syntax errors in your script and second turn on error_reporting.
Where did you find that script or you made it?
I made it myself. But in the meantime I find a solution less complicated.
Thanks anywa
-
I want to see the content of a query on a webpage based on an option selected in a dropdown list (sort of filter function)
I made following javascript and PHP script but doesn't receive the desired result (no records).
What do I do wrong ?
< script type="text/javascript">
function MM_callJS(jsStr) { //v2.0
var opd = document.form1.opdstatus.options[document.form1.opdstatus.selectedIndex].text;
alert (opd);
< ?php
mysql_select_db($database_myconnection, $myconnection);
if (opd == "Started") {
$query_dashboard = "SELECT * FROM dashboard WHERE Status = 'ST' ORDER BY Deadline ASC";
$dashboard = mysql_query($query_dashboard, $myconnection) or die(mysql_error());
$row_dashboard = mysql_fetch_assoc($dashboard);
$totalRows_dashboard = mysql_num_rows($dashboard);
}
if (opd == "Finished") {
$query_dashboard = "SELECT * FROM dashboard WHERE Status = 'FN' ORDER BY Deadline ASC";
$dashboard = mysql_query($query_dashboard, $myconnection) or die(mysql_error());
$row_dashboard = mysql_fetch_assoc($dashboard);
$totalRows_dashboard = mysql_num_rows($dashboard);
}
if (opd == "Pending") {
$query_dashboard = "SELECT * FROM dashboard WHERE Status = 'PN' ORDER BY Deadline ASC";
$dashboard = mysql_query($query_dashboard, $myconnection) or die(mysql_error());
$row_dashboard = mysql_fetch_assoc($dashboard);
$totalRows_dashboard = mysql_num_rows($dashboard);
}
if (opd == "All") {
$query_dashboard = "SELECT * FROM dashboard ORDER BY Deadline ASC";
$dashboard = mysql_query($query_dashboard, $myconnection) or die(mysql_error());
$row_dashboard = mysql_fetch_assoc($dashboard);
$totalRows_dashboard = mysql_num_rows($dashboard);
}
?>
}
< /script>
PHPMailer - use variables
in PHP Coding Help
Posted
Hello,
I am a PHP beginner and I made a PHP page which inserts data into a MYSql database.
.... $InsertQuery->Action = "insert"; $InsertQuery->Table = "klanten"; $InsertQuery->bindColumn("Klantnummer", "s", "".strtoupper(((isset($_POST["Klantnummer"]))?$_POST["Klantnummer"]:"")) ."", "WA_DEFAULT"); $InsertQuery->bindColumn("Naam_organisatie", "s", "".strtoupper(((isset($_POST["Naam_organisatie"]))?$_POST["Naam_organisatie"]:"")) ."", "WA_DEFAULT"); $InsertQuery->bindColumn("Adres_organisatie", "s", "".strtoupper(((isset($_POST["Adres_organisatie"]))?$_POST["Adres_organisatie"]:"")) ."", "WA_DEFAULT"); $InsertQuery->bindColumn("Postcode_organisatie", "s", "".strtoupper(((isset($_POST["Postcode_organisatie"]))?$_POST["Postcode_organisatie"]:"")) ."", "WA_DEFAULT"); $InsertQuery->bindColumn("Woonplaats_organisatie", "s", "".strtoupper(((isset($_POST["Woonplaats_organisatie"]))?$_POST["Woonplaats_organisatie"]:"")) ."", "WA_DEFAULT"); $InsertQuery->bindColumn("BTW_plichtig", "s", "".strtoupper(((isset($_POST["BTW_plichtig"]))?$_POST["BTW_plichtig"]:"")) ."", "WA_DEFAULT"); $InsertQuery->bindColumn("Email", "s", "".strtoupper(((isset($_POST["Email"]))?$_POST["Email"]:"")) ."", "WA_DEFAULT"); ...
After the insert, I want to send all the data with a mail to a recepient. But I can't find a way to code the "setForm" correctly with the inserted field "Email".
How can I do that?
Thank you in advance for your comments.