PHP - Simple: Send Xml With Php
I'm trying to send this:
Code: [Select] <?xml version="1.0" encoding="utf-8"?> <Request version="1.0" xmlns="http://europay.smart2pay.com/message"> <Action>INSERT_PAYIN</Action> <MID>F520156B-5E64-447F-B0B2-C638FA101C6F</MID> <PaymentMethod>mercadopago</PaymentMethod> <IPAddress>127.0.0.1</IPAddress> <Hash>F83525BC77811EC24FF10E50383BB5ED</Hash> <Details> <MTID>123456789</MTID> <Amount>100</Amount> <Currency>REA</Currency> <SuccessURL>http://www.smart2pay.com/success.html</SuccessURL> <FailureURL>http://www.smart2pay.com/failure.html</FailureURL> <CancelURL>http://www.smart2pay.com/cancel.html</CancelURL> <ProcessingURL>http://www.smart2pay.com/processing.html</ProcessingURL> <Shipping Amount="50" CostMode="DS" /> <Language>pt-BR</Language> <Description>payment</Description> <CustomerName FirstName="John" LastName="Doe" /> <CustomerEmail>john.doe@test.com</CustomerEmail> </Details> </Request> to this: Code: [Select] https://europaytest.smart2pay.com/MerchantService.asmx?wsdl How do I do it? Similar TutorialsI'm admittedly very ignorant about email in general. I want some way to send emails in a way that just works (tm). The receiver doesn't need to be able to reply so I don't want to mess with SMTP logins or anything. I have a list of email addresses that I want my script to loop through and send an email to each. I messed with the mail() function and passed my own email address to it with a subject and body and executed the script but I never got the email. I assume I have to configure some server or something in php.ini. Now, this script is going to be redistributed so I want to reduce the hassle required to install/configure it. Knowing this, can somebody link me to an article explaining the simplest way to send a very basic email? No HTML, no attachments, no replying, just simple subject/body email. if anyone out there fancy's helping the needy please can you cast your eyes over my mess! and possibly help me find my way out of this maze? So im useing a third party form, and a third party php script.......... cant get them to work together . form script : [color=red//-------------------------------------------------[/color] <form action="phpquote.php" method="post" id="reserve-form"> <div class="box"> <div class="left-top-corner"> <div class="right-top-corner"> <div class="border-top"></div> </div> </div> <div class="border-left"> <div class="border-right"> <div class="xcontent"> <h5>Get an online quote for your journey</h5> <p>please fill in all fields for your quote.</p> <fieldset> <div class="field"> <label>Customer Information</label> <input type="text" id="name" value="Name" onblur="if(this.value==''){this.value='Name'}" onfocus="if(this.value=='Name'){this.value=''}" /> </div> <div> <input type="text" id="number" value="Phone" onblur="if(this.value==''){this.value='Phone'}" onfocus="if(this.value=='Phone'){this.value=''}" /> </div> </fieldset> <fieldset class="style1"> <div class="field"> <label>Travel Date/ Time</label> <select id="year"> <option>2010</option> <option>2011</option> </select> <select class="sel-1" id="month"> <option>Jan</option> <option>Feb</option> <option>Mar</option> <option>Apr</option> <option>May</option> <option>Jun</option> <option>Jul</option> <option>Aug</option> <option>Oct</option> <option>Sep</option> <option>Nov</option> <option>Dec</option> </select> <select class="sel-2" id="date"> <option>1</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</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> </div> <div class="field"> <select class="sel-2" id="time"> <option>00</option> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option> <option>06</option> <option>07</option> <option>08</option> <option>09</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></select> <select class="sel-2" id="time"> <option>00</option> <option>15</option> <option>30</option> <option>45</option> </select> </div> <div class="field"> <label>No. Passangers</label> <select id="year"> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option> <option>06</option> </select> </div> </fieldset> <fieldset class="style2"> <div class="field"> <label>Pickup Information</label> <input type="text" id="where" value="Pickup Address" onblur="if(this.value==''){this.value='Pickup Address'}" onfocus="if(this.value=='Pickup Address'){this.value=''}" /> </div> <div> <select id="where"> <option>or Airport</option> <option>Stansted</option> <option>Gatwick</option> <option>Heathrow</option> <option>Luton</option> </select> </div> </fieldset> <fieldset class="style2 style3"> <div class="field"> <label>Drop-off Information</label> <input type="text" id="to" value="Drop-off Address" onblur="if(this.value==''){this.value='Drop-off Address'}" onfocus="if(this.value=='Drop-off Address'){this.value=''}" /> </div> <div> <select id="to"> <option>or Airport</option> <option>Stansted</option> <option>Gatwick</option> <option>Heathrow</option> <option>Luton</option> </select> </div> </fieldset> </div> </div> </div> <div class="left-bot-corner"> <div class="right-bot-corner"> <div class="border-bot"><a href="#" class="link2" onclick="document.getElementById('reserve-form').submit()"><em><b>Get Quote</b></em></a></div> </div> </div> </div> </form> //----------------------------------------------------------------------------- php script //----------------------------------------------------------------------------- <?php //--------------------------Set these paramaters-------------------------- // Subject of email sent to you. $subject = 'Results from Contact form'; // Your email address. This is where the form information will be sent. $emailadd = 'm.mcdade@hotmail.co.uk'; // Where to redirect after form is processed. $url = 'http://www.mock.thetaxirank.co.uk/thankyou.html'; // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty. $req = '0'; // --------------------------Do not edit below this line-------------------------- $text = "Results from form:\n\n"; $space = ' '; $line = ' '; foreach ($_POST as $key => $value) { if ($req == '1') { if ($value == '') {echo "$key is empty";die;} } $j = strlen($key); if ($j >= 20) {echo "Name of form element $key cannot be longer than 20 characters";die;} $j = 20 - $j; for ($i = 1; $i <= $j; $i++) {$space .= ' ';} $value = str_replace('\n', "$line", $value); $conc = "{$key}:$space{$value}$line"; $text .= $conc; $space = ' '; } mail($emailadd, $subject, $text, 'From: '.$emailadd.''); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">'; ?> //----------------------------------------------------------------------------- any advice will be appreciated..... thanks in advance to any kind souls !!! Hello all, I used simple php email function but it send an email in junk folder or spam. Can anyone tell me why is this so? Her is the code: $host = "ssl://smtp.gmail.com"; $port = "465"; $to = " xx@gmail.com"; // note the comma $subject = " $_POST[company_website] "; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: About Wholesale Account' . "<$_POST[email]>\r\n"; $headers .= 'Cc: mail@gmail.com' . "\r\n"; $headers .= 'Bcc: cc@gmail.com' . "\r\n"; mail($to, $subject, $message, $headers); I am working on a phpmailer script that sends an order confirmation email to the customer AND the client at the same time. If I have the customer email and client email set both to the originating domain's email addresses (myname@myserver.com), then it sends fine. However, if I try to send to an outside mail server (eg. someone@gmail.com), I get the following errors: Code: [Select] SMTP -> FROM SERVER:220 myserver.com ESMTP Exim 4.63 Sat, 18 Sep 2010 15:08:21 -0700 SMTP -> FROM SERVER: 250 myserver.com Hello localhost [127.0.0.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH LOGIN PLAIN 250-STARTTLS 250 HELP SMTP -> FROM SERVER:250 OK SMTP -> FROM SERVER:250 Accepted SMTP -> FROM SERVER: SMTP -> ERROR: RCPT not accepted from server: SMTP Error: The following recipients failed: someone@gmail.com Message could not be sent. Mailer Error: SMTP Error: The following recipients failed: someone@gmail.com SMTP server error: I'm not sure what's going on here. Any SMTP or phpmailer geniuses here that can shed some light on what needs to happen here for this to send to any address? Hi, I'm trying to setup a quick PHP script that will grab the email from the url (see below) and after inserting into MySQL db - which is working fine - the script will complete two additional tasks: 1. send that same captured email out to a external db as in shown via http://domain1.com/insert.php?email=$lead (example), but then send to a DIFFERENT source - the originator of the lead - a portback acknowledgement using Header (sending the status and email to http://domain2.com/check.php?e=$lead&s=$status for their records). See the code below: ------------------------- Code: [Select] $lead = $_REQUEST['e_mail']; // will grab email from posted url string and assign to local variable $result = mysql_query($command); // this is just to execute the MySQL insert which works just fine but included here to explain validation below // Create API Call string to insert lead into iContact folder $requestURL = "http://domain1.com/insert.php?email=$lead"; // Execute API Call to CAKE $xml = simplexml_load_file($requestURL) or die("feed not loading"); if ($result) { $status = 1; // mark lead as sucess // send postback on lead status header("Location: http://domain2.com/check.php?e=$lead&s=$status"); } -------- Problem: I'm getting all sorts of errors with the simplexml_load_file() function and can't figure out why it won't work. Any input appreciated as this the only way I know how to pass the lead onward and then inform/update the other party of receipt of information. thanks! Hi everyone, I'm trying to select either a class or an id using PHP Simple HTML DOM Parser with absolutely no luck. My example is very simple and seems to comply to the examples given in the manual(http://simplehtmldom.sourceforge.net/manual.htm) but it just wont work, it's driving me up the wall. Here is my example: http://schulnetz.nibis.de/db/schulen/schule.php?schulnr=94468&lschb= I think the HTML is invalid: i cannot parse it. Well i need more examples - probly i have overseen something! If anybody has a working example of Simple-html-dom-parser...i would be happy. The examples on the developersite are not very helpful. your dilbertone Hello, im very green to php and I am having trouble creating a simple log in script. Not sure why this is not working, maybe a mysql_query mistake? I am not receiving any errors but nothing gets updated in the members table and my error message to the user displays. any help is appreciated! here is my php: <?php session_start(); $errorMsg = ''; $email = ''; $pass = ''; if (isset($_POST['email'])) { $email = ($_POST['email']); $pass = ($_POST['password']); $email = stripslashes($email); $pass = stripslashes($pass); $email = strip_tags($email); $pass = strip_tags($pass); if ((!$email) || (!$pass)) { $errorMsg = '<font color="#FF0000">Please fill in both fields</font>'; }else { include 'scripts/connect_db.php'; $email = mysql_real_escape_string ($email); $pass = md5($pass); $sql = mysql_query("SELECT * FROM members WHERE email='$email' AND password='$pass'"); $log_check = mysql_num_rows($sql); if ($log_check > 0) { while($row = mysql_fetch_array($sql)) { $id = $row["id"]; $_SESSION['id']; $email = $row["email"]; $_SESSION['email']; $username = $row["username"]; $_session['username']; mysql_query("UPDATE members SET last_logged=now() WHERE id='$id' LIMIT 1"); }//Close while loop echo "You are logged in"; exit(); } else { $errorMsg = '<font color="#FF0000">Incorrect login data, please try again</font>'; } } } ?> and the form: <?php echo $errorMsg; ?> <form action="log_in.php" method="post"> Email:<br /> <input name="email" type="text" /><br /><br /> Password:<br /> <input name="password" type="password" /><br /><br /> <input name="myBtn" type="submit" value="Log In" /> </form> Hi can someone pls help, im tryin a tutorial but keep getting errors, this is the first one i get after registering. You Are Registered And Can Now Login Warning: Cannot modify header information - headers already sent by (output started at /home/aretheyh/public_html/nealeweb.com/regcheck.php:43) in /home/aretheyh/public_html/nealeweb.com/regcheck.php on line 46 Hello i need the php send code for this html code if anyone can help me? website url: http://dclxvi.co.uk/htmlform.htm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en-GB" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="A site for contacting a dj to play at an event"/> <meta name="keywords" content="DJ, Decks, AI-disco, AI Disco, Disco"/> <meta name="author" content="Ashley Sargent"/> <link rel="stylesheet" href="stylee.css" type="text/css" /> <title>DCLXVI: Booking</title> </head> <body> <div id="container"> <div id="header"> </div> <div id="navigation"> <div id="navigation"> <ul class="menu"> <div class="left"> <a href="index.html"><img src="imagess/homet.gif" onmouseover="this.src='imagess/homet1.gif'" onmouseout="this.src='imagess/homet.gif'"> <a href="services.html"><img src="imagess/services.jpg" onmouseover="this.src='imagess/services1.jpg'" onmouseout="this.src='imagess/services.jpg'"> <a href="about.html"><img src="imagess/about.jpg" onmouseover="this.src='imagess/about1.jpg'" onmouseout="this.src='imagess/about.jpg'"> <a href="contact.html"><img src="imagess/contact.jpg" onmouseover="this.src='imagess/contact1.jpg'" onmouseout="this.src='imagess/contact.jpg'"> <a href="faq.html"><img src="imagess/faq.jpg" onmouseover="this.src='imagess/faq1.jpg'" onmouseout="this.src='imagess/faq.jpg'"> <a href="gallery.html"><img src="imagess/gallery1.jpg" onmouseover="this.src='imagess/gallery2.jpg'" onmouseout="this.src='imagess/gallery1.jpg'"> <a href="login.php"><img src="imagess/login.jpg" onmouseover="this.src='imagess/login1.jpg'" onmouseout="this.src='imagess/login.jpg'"> <a href=""></a> </div> </div> <br><br><br> <form name="htmlform" method="post" action="html_form_send.php"> <table border="1" bordercolor="0000FF" cellspacing="2" cellpadding="5"> </tr> <U><b>Personal Information:</b></U><BR><BR> <tr> <td valign="top"> <label for="Title">Title *</label> </td> <td valign="top"> <select> <option><selected>--Please Select--</option> <option>Mr</option> <option>Mrs</option> <option>Miss</option> <option>Dr</option> <option>Other</option></select>Other:<INPUT type="text" SIZE="20"> <tr> <td valign="top"> <label for="first_name">First Name *</label> </td> <td valign="top"> <input type="text" name="first_name" maxlength="50" size="30"> </td> </tr> </select> <tr> <td valign="top""> <label for="last_name">Last Name *</label> </td> <td valign="top"> <input type="text" name="last_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top"> <label for="email">Email Address *</label> </td> <td valign="top"> <input type="text" name="email" maxlength="80" size="30"> </td> </tr> <tr> <td valign="top"> <label for="telephone">Telephone Number *</label> </td> <td valign="top"> <input type="text" name="telephone" maxlength="30" size="30"> </td> </tr> </tr> </table> <br><br> <table border="1" bordercolor="0000FF" cellspacing="2" cellpadding="5" width="460"> <u><b>Event Information:</b></u><br><br> <tr> <td valign="top"> <label for="occasion">Occasion</label> </td> <td valign="top"> <select> <option><selected>--Please Select--</option> <option>Birthday</option> <option>Wedding</option> <option>Anniversary</option> <option>Party</option> <option>Engagement</option> <option>Valentines</option> </select> <tr> <td valign="top"> <td valign="top"> <input type="checkbox" value="70's">70's<br> <input type="checkbox" value="80's">80's <input type="checkbox" value="90's">90's<br> <input type="checkbox" value="Cheese">Cheese <input type="checkbox" value="Mainstreem">Mainstreem R n B<br> <input type="checkbox" value="House">House <input type="checkbox" value="Dance">Dance<br> <input type="checkbox" value="Garage">Garage <input type="checkbox" value="hiphop">Hip-Hop<br> <input type="checkbox" value="Karaoke">Karaoke <input type="checkbox" value="Other">Other <INPUT type="text" SIZE="6"> </div> </td> </tr> </select> <tr> <td valign="top"> <label for="event_date">Event Date</label> </td> <td valign="top"> <input type="text" name="event_date" maxlength="50" size="30"> </td> </tr> <td valign="top"> <label for="length_of_party">Length of Party</label> </td> <td valign="top"> <select> <option><selected>--Please Select--</option> <option>1 Hour</option> <option>2 Hours</option> <option>3 Hours</option> <option>4 Hours</option> <option>5 Hours</option> <option>Other</option></select>Other:<INPUT type="text" SIZE="10"> </td> </tr> <tr> <td valign="top"> <label for="location">Location</label> </td> <td valign="top"> <input type="text" name="location" maxlength="30" size="30"> </td> </tr> <tr> <td valign="top"> <label for="comments">Comments</label> </td> <td valign="top"> <textarea name="comments" cols="29" rows="5"> Enter your comments here... </textarea> <center><input type="submit" value="Submit" /></center> </td> </tr> </table> I am trying the following code to send SMS. <?php $gatewayURL = 'http://localhost:9333/ozeki?'; $request = 'login=admin'; $request .= '&password=abc123'; $request .= '&action=sendMessage'; $request .= '&messageType=SMS:TEXT'; $request .= '&recepient='.urlencode('+9898989898'); $request .= '&messageData='.urlencode("Hello World"); $url = $gatewayURL . $request; //Open the URL to send the message file($url); ?> But I am getting the following error message. Warning: file(http://localhost:9333/ozeki?login=ad...ta=Hello+World) [function.file]: failed to open stream: Connection refused in /home/vpe/public_html/_demo2/sms/sms2.php on line 13 Please help to rectify my code. Thanks a lot in advance. i would like to send sms using AT Hayes command in php... is it possible? Hi Guys I want to knw if its possible to send job to print with php. example, in my database I have a table called Letters which stores letters, while I loop through the table, I want to print each letter off, any examples available? Thank you Hi every one I've downloaded some classes but they weren't work . How do I send a private message? thanks Guys, give me an idea of using a free or open sorce software for transferring messages over a local network between computers using MAC OS and Linux platforms.
Hi guys, i have a custom made php that collect all the info in admin page (long story short), there's a button called "Approve" I would like to send back an email to user who applied with picture, once Approved button is pressed, so here's the script: <?php session_start(); $user = '123'; $pass = '123'; $to = $data['email']; $subject = 'blablabla'; $message = 'test123'; if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] != $user || $_SERVER['PHP_AUTH_PW'] != $pass) { header('WWW-Authenticate: Basic realm="Enter password to access this page."'); header('HTTP/1.0 401 Unauthorized'); echo"You must be logged in to see this page."; exit; } ################## PROTECTED CONTENT ######################## require('./config.php'); ?> <!DOCTYPE HTML> <html> <head> <title>ADMIN PANEL</title> <style type="text/css"> body{width: 960px; margin: auto; margin-top: 20px; padding: 5px 20px; box-shadow: 0px 0px 2px #000000; border-radius: 5px;background:transparent url(images/bg_header.gif) top left repeat-x;} a:link,a:active,a:visited{color: inherit; text-decoration: none;} a:hover{text-decoration: underline;} .button{background:transparent url(images/grad.PNG) bottom left repeat-x; padding: 3px 5px; border-radius: 4px; border: 1px solid #cccccc;} .button:hover{border-color:orangered;text-decoration:none;} .approve .img{max-height: 200px; max-width: 200px; position: absolute; right: 5px; top: 5px;} .approve{display: block; height: 200px; overflow: hidden; box-shadow: 0px 0px 2px #000000; margin-top: 20px; padding: 20px; position: relative; font:13px verdana;} textarea,input{padding: 3px;font: 13px helvetica,verdana;border:1px solid rgb(51,151,251);border-radius: 4px;width: 300px; display: block; margin: 5px 0px;} input:hover,textarea:hover{border-color:orangered;cursor:pointer;} form{font:bold 13px verdana;} input[type='submit'],input[type='button']{width: auto;} </style> </head> <body> <?php echo" <div id='head'> <h1 align='center'>ADMIN PANEL</h1> <h4 align='center'><a href='index.php' class='button'>Homepage</a> <a class='button' href='admin.php'>Approval Queue</a> <a class='button' href='admin.php?edit'>Edit Image info.</a> <a class='button' href='?edit&view'>View Image Info.</a></h4> </div>"; if (isset($_GET['edit'])) { if (isset($_GET['pid'])) { $pic = mysql_query('SELECT * from `' . $table_name . '` WHERE pid = ' . intval($_GET['pid'])); if (mysql_num_rows($pic) == 1) { if (isset($_POST['submit'])) { $approved = isset($_POST['approved']) && $_POST['approved'] == '1' ? 1 : 0; mysql_query('UPDATE `' . $table_name . '` SET ' . 'first_name = "' . $_POST['first'] . '",' . 'last_name="' . $_POST['last'] . '",' . 'phone="' . $_POST['phone'] . '",' . 'email="' . $_POST['email'] . '",' . 'first_name="' . $_POST['first'] . '",' . 'approved=' . $approved . ',' . 'address="' . $_POST['addr'] . '",' . 'admin_desc="' . $_POST['admin_desc'] . '"' . ' WHERE pid = ' . intval($_GET['pid'])) or exit("Unable to edit" . mysql_error()); echo'<h3>EDITED</h3>'; $pic = mysql_query('SELECT * from `' . $table_name . '` WHERE pid = ' . intval($_GET['pid'])); } $data = mysql_fetch_array($pic); if (isset($_GET['view'])) { echo' <strong>Uploaded by </strong>' . $data['first_name'] . ' ' . $data['last_name'] . ' <br /> <img src="' . $default_dir . $data['image_name'] . '" style="max-width: 200px; max-height:200px; float: right;" /> <br /> <br /> <b>First_name :</b> ' . $data['first_name'] . ' <br /> <br /> <b>Last_name :</b> ' . $data['last_name'] . ' <br /> <br /> <b>Phone :</b> ' . $data['phone'] . ' <br /> <br /> <b>Email :</b> ' . $data['email'] . ' <br /> <br /> <b>Approved :</b> ' . ($data['approved'] == 1 ? 'Yes' : 'No') . ' <br /> <br /> <b>Address :</b> ' . $data['address'] . ' <br /> <br /> <b>Admin_description :</b> <br /> <br />' . $data['admin_desc'] . ' <br /> <br /> <a href="?edit&pid=' . $data['pid'] . '" class="button">Edit</a> <br /> <br /> '; } else { echo'<form method="POST" action="?edit&pid=' . intval($_GET['pid']) . '"> Editting photo: <a style="color:rgb(51,151,251);" href="' . $default_dir . $data['image_name'] . '">' . $data['image_name'] . '</a> uploaded by ' . $data['first_name'] . ' ' . $data['last_name'] . ' <br /> <img src="' . $default_dir . $data['image_name'] . '" style="max-width: 200px; max-height:200px; float: right;" /> <br /> First_name : <input type="text" name="first" value="' . $data['first_name'] . '" /> Last_name : <input type="text" name="last" value="' . $data['last_name'] . '" /> Phone : <input type="text" name="phone" value="' . $data['phone'] . '" /> Email : <input type="text" name="email" value="' . $data['email'] . '" /> Approved : <input type="text" name="approved" value="' . $data['approved'] . '" /> 0 or 1 Address : <textarea name="addr">' . $data['address'] . '</textarea> Admin_description : <textarea name="admin_desc">' . $data['admin_desc'] . '</textarea> <input type="submit" name="submit" value="Edit" /> </form>'; } } else { echo"NO SUCH PICTURE EXISTS"; } } else { echo" <h3>Search for image to " . (isset($_GET['view']) ? 'view' : 'edit') . " it: </h3> <form id='form' method='POST' action='admin.php?edit" . (isset($_GET['view']) ? '&view' : '') . "'> Uploader's first name: <input type='text' name='name' value='' /> OR Image name: <input type='text' name='img' value='' /> OR Email: <input type='text' name='email' value='' /> <input type='submit' name='submit' value='Search' /> </form>"; if (isset($_POST['submit'])) { $name = empty($_POST['name']) ? '%' : '%' . $_POST['name'] . '%'; $email = empty($_POST['email']) ? '%' : '%' . $_POST['email'] . '%'; $img = empty($_POST['img']) ? '%' : '%' . $_POST['img'] . '%'; $query = mysql_query( 'SELECT * from `' . $table_name . '` where ' . 'first_name like "' . $name . '" and ' . 'email like "' . $email . '" and ' . 'image_name like "' . $img . '"'); if (mysql_num_rows($query) > 0) { while ($pic = mysql_fetch_array($query)) { echo"<hr/><strong>Uploaded by $pic[first_name] $pic[last_name] " . date(' \a\t H:i \o\n d/m/Y', intval($pic['image_name'])) . "</strong> - <a href='$default_dir$pic[image_name]' target='_blank'>$pic[image_name]</a> <a href='?edit" . (isset($_GET['view']) ? '&view' : '') . "&pid=$pic[pid]' class='button'>" . (isset($_GET['view']) ? 'View' : 'Edit') . "</a>"; } } else { echo "NO IMAGE MATCHES THAT DESCRIPTION"; } } } exit; } if (isset($_GET['approve'])) { if (mysql_query('UPDATE `' . $table_name . '` SET approved = 1 WHERE pid = ' . intval($_GET['approve']))) { if (@mail($to, $subject, $message)) { echo('<p>Mail sent successfully.</p>'); } else { echo('<p>Mail could not be sent.</p>'); } echo"<h2>APPROVEDs</h2>"; } } It's not whole script though. Hey I'm trying to send my check-boxes with PHP. Before i added them to my script everything worked fine, i tested the form and i received the answers in my inbox. when i tried to let the checkboxes work, it stopped working. Please help me out! ! I've added this to check my check-boxes: Code: [Select] if ($_POST['Keukens'] == 'on') { $Keukens = "Ja"; } else { $Keukens = "Nee"; } if ($_POST['Badkamers'] == 'on') { $Badkamers = "Ja"; } else { $Badkamers = "Nee"; } if ($_POST['Kasten'] == 'on') { $Kasten = "Ja"; } else { $Kasten = "Nee"; } if ($_POST['Kantoormeubels'] == 'on') { $Kantoormeubels = "Ja"; } else { $Kantoormeubels = "Nee"; } if ($_POST['Tafels'] == 'on') { $Tafels = "Ja"; } else { $Tafels = "Nee"; } if ($_POST['Overige'] == 'on') { $Overige = "Ja"; } else { $Overige = "Nee"; } This is the delivery part: Code: [Select] else { $recipient = "sven@hotmail.com"; //Het email adres van de Ontvanger. $subject = $_POST['sub']; //Onderwerp van de mail. $header = "From: " . $_POST['uwemail'] . "\n"; $mail_body = "Het Contact formulier werd op " . date("d-m-Y") . " om " . date("H:i") . " uur uitgevoerd.\n"; $mail_body .= "De volgende persoon vulde het contact formulier in:\n\n"; $mail_body .= "Voorletters: " . $_POST['voorletters'] . "\n"; $mail_body .= "Achternaam: " . $_POST['naam'] . "\n\n"; $mail_body .= "Adres: " . $_POST['adres'] . "\n"; $mail_body .= "Postcode: " . $_POST['postcode'] . "\n"; $mail_body .= "Woonplaats: " . $_POST['plaats'] . "\n\n"; $mail_body .= "Telefoonnummer: " . $_POST['tel'] . "\n"; $mail_body .= "E-mailadres: " . $_POST['uwemail'] . "\n\n"; $mail_body .= "Onderwerp: " . $_POST['sub']. "\n"; $mail_body .= "Vraag: " . $_POST['field']. "\n\n"; $mail_body .= "Interesses:\n\n"; $mail_body .= "Keukens: ".$Keukens."\n"; $mail_body .= "Badkamermeubels: ".$Badkamermeubels."\n"; $mail_body .= "Kasten: ".$Kasten."\n"; $mail_body .= "Kantoormeubels: ".$Kantoormeubels."\n"; $mail_body .= "Tafels: ".$Tafels."\n"; $mail_body .= "Overige: ".$Overige."\n"; $mail_body .= "\n\n -- Einde van het formulier--"; mail($recipient, $subject, $mail_body, $header); echo "<font color=\"#FFFFFF\"><center><b>Bedankt voor uw reactie.</b><br><br>Wij zullen zo snel mogelijk contact met u opnemen.<br> Met vriendelijke groet,<br>Sven</b><br><br><br>"; echo "Terug naar het <a class=\"main\" href='javascript:history.back(1)'>formulier</a></center></font>"; } } else { ?> This the HTML part: Code: [Select] <font face="Verdana, Arial, Helvetica, sans-serif"> <label> <input type="checkbox" name="Keukens" id="keuze1" value="Keukens"/> <font color="#FFFF00" size="2"> <font size="1">Keukens</font></font></label> <font color="#FFFF00" size="1"><br /> <label> <input type="checkbox" name="Badkamers" id="keuze2" value="Badkamers"/> Badkamermeubels</label> <br /> <label> <input name="Kasten" type="checkbox" id="keuze3" value="Kasten" /> Kasten</label> <br /> <label> <input type="checkbox" name="Kantoormeubels" id="keuze4" value="Kantoormeubels"/> Kantoormeubels</label> <br /> <label> <input type="checkbox" name="Tafels" id="keuze5" value="Tafels"/> Tafels</label> <br /> <label> <input type="checkbox" name="Overige" id="keuze6" value="Overige"/> Overige</label> </font><br /> </font></div>
According to I have a SOAP API send to a operator for SMS server
so I want to send a URL to them "https://covaf.gov.la/covaf-web/" |