Jump to content

timmah1

Members
  • Posts

    1,170
  • Joined

  • Last visited

Everything posted by timmah1

  1. Thanks for the replies, but to be honest, I didn't post on here for advice, good advice nontheless, but not the reason I posted. They are going to be hidden fields, they are just text so I can view the results. This is for a site that was already done with PayPal shopping cart, they are wanting to be able to edit the information for the items through a backend instead of replacing the html code everytime they change something. Thanks anyhow, I'll find the solution
  2. I'm trying to pass two different values from the drop down option to two different hidden fields I have drop down like: function Exchange(First, Second){ var Elm1 = document.getElementById('on0'); var Elm2 = document.getElementById('amount') Elm2.value = Elm1.value; } <select name="on0" onchange="Exchange('on0', 'amount');">' <?php while($rows = mysql_fetch_object($sql)){ echo '<option value="'.$rows->name.'-'.$rows->price.'">'.$rows->name.'-'.$rows->price.'</option>'; } echo '</select>'; Then I need the values to be put into these fields echo '<input type="text" name="amount" id="amount" value="" />'; echo '<input type="text" name="on0" id="on0" value="" />'; I really have no idea how to make this work. Can anybody help me out? thanks in advance
  3. I'm building a shopping cart like system. I'm trying to have every item,price,qty and price carry over to a checkout page, but this is only pulling the last item foreach($_POST as $key => $value) { echo "POST parameter '".$key."' has '".$value."'<br>"; } and doing this, only pulls the the id foreach($_POST['id'] as $key => $value) { echo "POST parameter '".$key."' has '".$value."'<br>"; } How do I go about having every thing that is in the cart be be processed on this form? echo '<input type="hidden" name="id[]" value="'.$row->id.'">'; echo ' <tr> <td align="left"><input type="hidden" name="name[]" value="'.$row->name.'">'.$row->name.'</td> <td align="center"><input type="hidden" name="qty[]" value="'.$rows['qty'].'">'.$rows['qty'].'</td> <td align="center"><input type="hidden" name="price[]" value="'.$row->price.'">$'.$row->price.'</td> <td align="right">$'.$row->price*$rows['qty'].'</td> <td><a href="?p=mycart&action=delete&id='.$rows['id'].'"><img src="assets/img/remove.png"></a></td> </tr>'; So if there are more than 1 item, it should read: item1 2 $4.99 item2 1 $3.99 etc. Thanks in advance
  4. Nevermind, I had double $$ before insert_data_str It works now Thanks for everybody's help
  5. Thank you. I no longer have the error, but it still does not insert the data $insert_data = array(); for($j=0; $j < count($_FILES["item_file"]['name']); $j++) { //loop the uploaded file array $filen = $_FILES["item_file"]['name']["$j"]; //file name $ran = rand (); $new_file = $ran.$filen; $path = '../app_ads/'.$new_file ; //generate the destination path if(move_uploaded_file($_FILES["item_file"]['tmp_name']["$j"],$path)) { //upload the file $GLOBALS['msg'] .= "File(s) ".$new_file . " uploaded successfully<br>"; //Success message // add to $insert_data $insert_data[] = "$appid, '" . mysql_real_escape_string($new_file) . "', 1"; } } //$value = implode(',', $insert_data); $insert_data_str = implode(',', $insert_data); $query = "INSERT INTO app_ads(app_id, app_ad, active) VALUES($insert_data_str)"; $result = mysql_query($query); header("Location: page_articles.php#main-tabs-3-tab");
  6. Parse error: syntax error, unexpected T_STRING in /home/local/public_html/members/page_articles.php on line 43
  7. When I do that, I get an error on this line header("Location: page_articles.php#main-tabs-3-tab"); Which is right below the insert statement
  8. Thank you, the problem now is that it won't insert into the database $insert_data = array(); for($j=0; $j < count($_FILES["item_file"]['name']); $j++) { //loop the uploaded file array $filen = $_FILES["item_file"]['name']["$j"]; //file name $ran = rand (); $new_file = $ran.$filen; $path = '../app_ads/'.$new_file ; //generate the destination path if(move_uploaded_file($_FILES["item_file"]['tmp_name']["$j"],$path)) { //upload the file $GLOBALS['msg'] .= "File(s) ".$new_file . " uploaded successfully<br>"; //Success message // add to $insert_data $insert_data[] = "($appid, '" . mysql_real_escape_string($new_file) . "', 1)"; } } //$value = implode(',', $insert_data); $sql = mysql_query("INSERT INTO app_ads(app_id, app_ad, active) VALUES(".implode(',', $insert_data).""); header("Location: page_articles.php#main-tabs-3-tab");
  9. I'm not sure what the problem is here, this has worked on 2 different sites before, but for some reason it's not now This upload gives the user the option of uploading 1, or multiple files by just clicking the plus sign to add another upload field, it uploads the files with the new names with no problem, the problem lies when it inserts into the database. Instead of creating 2 lines or more with the different file names, it's putting the same file name for each file that is uploaded I need to be able to insert each new_file name into the database. This is the code that gives the user the option <a href="javascript:_add_more();" title="Add more"><img src="./images/plus_icon.png" border="0"></a> <div id="dvFile">Click the <img src="./images/plus_icon.png" border="0" width="15"> symbol to add more photos<br /> <input type="file" name="item_file[]"> </div></div And here is the code for uploading if(count($_FILES["item_file"]['name'])>0) { //check if any file uploaded $GLOBALS['msg'] = ""; //initiate the global message for($j=0; $j < count($_FILES["item_file"]['name']); $j++) { //loop the uploaded file array $filen = $_FILES["item_file"]['name']["$j"]; //file name $ran = rand (); $new_file = $ran.$filen; $path = '../app_ads/'.$new_file ; //generate the destination path if(move_uploaded_file($_FILES["item_file"]['tmp_name']["$j"],$path)) { //upload the file $GLOBALS['msg'] .= "File(s) ".$new_file . " uploaded successfully<br>"; //Success message } } foreach($_FILES["item_file"]['name'] as $v){ $sql1 = mysql_query("INSERT INTO app_ads(app_id,app_ad,active) VALUES('$appid','$new_file','1')") or die(mysql_error()); } } Any help would be greatly appreciated. Thanks in advance
  10. Wow, ok, let's jump on me because I didn't "ask" the question right. I apologize for not stating the issue other than "this isn't working". The problem is, no results are showing. When it is on one server, results show, and the map gets populated. When we put it on the server that it is going to run on, no results show, and the map only shows the ocean. So with that being said, can anybody see why this code does not produce any results? Thanks again
  11. Could you please enlighten me about these lines? Like my previous post, I'm not understanding. Thanks
  12. Ok, I'm confused I see line 14 being :var max_results="25"; Line 43: ,draggingCursor: 'pointer' And i don't see line 177
  13. Can someone tell me why this isn't working? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title></title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script> <script language="Javascript" type="text/javascript"> //<! var center="Denver, CO"; var item="italian|restaurant"; var radius="10000"; var max_results="25"; var scriptname="places.php"; var map=null,markers=[],infowindow=null,refcache=[],detailcache=[]; function Initialize() { $.get(scriptname+'?search',{},function(data){ results=[]; try { eval('data='+data+';'); if (data.status=='OK' && data.results.length) { results=data.results; } gotGeocoder(data.location); } catch (e) {} gotResults(results); }); map = new google.maps.Map(document.getElementById('gmap_area'), { mapTypeControl: true ,mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR ,position: google.maps.ControlPosition.LEFT_TOP } ,zoom: 10 ,center: new google.maps.LatLng(0, 0) ,draggableCursor: 'crosshair' ,draggingCursor: 'pointer' ,panControl: true ,panControlOptions: {position: google.maps.ControlPosition.LEFT_CENTER} ,zoomControl: true ,zoomControlOptions:{position:google.maps.ControlPosition.LEFT_CENTER} ,overviewMapControl:true ,overviewMapControlOptions:{opened:false} ,disableDoubleClickZoom:true ,streetViewControl: true ,streetViewControlOptions:{position: google.maps.ControlPosition.LEFT_BOTTOM} ,styles: [{ visibility: "on" }] ,mapTypeId:google.maps.MapTypeId.HYBRID }); infowindow=new google.maps.InfoWindow(); } function gotGeocoder (geolocation) { map.setCenter(new google.maps.LatLng(geolocation.lat, geolocation.lng)); } function gotResults(results) { for(i=0;i<markers.length;i++) markers[i].setMap(null); var bounds=new google.maps.LatLngBounds(); var result_to_display=results.length; if (result_to_display>max_results) result_to_display=max_results; var html=''; for (i=0; i<result_to_display; i++) { var result = results[i]; html+='<div class="result">'; html+='<div class="result-name"><a target=_blank onmouseover="goToPlace('+"'"+result.reference+"'"+',this)">'+result.name+'</a></div>'; html+='<div class="vicinity">'+result.vicinity+'</div>'; html+='<div class="direction"><a target=_blank href="' +'https://www.google.com/maps?source=uds&daddr='+result.vicinity+'('+result.name+')@'+result.geometry.location.lat+','+result.geometry.location.lng+'&saddr='+center +'">direction</a></div>'; html+='</div>'; var options={ map:map ,position:new google.maps.LatLng(result.geometry.location.lat, result.geometry.location.lng) }; var marker=new google.maps.Marker(options); marker.content='<p>'+result.name+'</p><p>'+result.vicinity+'</p>'; bounds.extend(marker.getPosition()); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent( this.content ); infowindow.open(map,this); }); markers.push(marker); } $('#searchcontrol').html(html); if (results.length) map.fitBounds(bounds); } function gotReference (data,a) { var content=$(a).html(); var parent=$(a).parent(); parent.html('<a href="'+data.url+'" target=_blank>'+content+'</a>'); } function goToPlace (reference,a) { var index=refcache.indexOf(reference); if (index===-1) $.get(scriptname+'?reference='+reference,{},function(data){ result={}; try { eval('data='+data+';'); if (data.status=='OK' && data.result) { result=data.result; } refcache.push(reference); detailcache.push(result); } catch (e) {} gotReference(result,a); }); else { gotReference(detailcache[index],a); } } $(document).ready(function(){ Initialize(); }); //]]> </script> <style> .localexample{width: 40%;height: 100%;float: left;} .localexample strong{display: block;border-bottom: 1px dotted #ccc;margin-bottom: 20px;} #googleversion{margin-right: 50px;} #myversion{} #gmap_area {height:560px;} .gsc-resultsHeader,.gsc-above-wrapper-area,.gsc-control form,#searchresults {display:none;} .result {margin:8px 0px;} .result .result-name {font-weight:bold;color:blue;text-decoration:underline;cursor:pointer;} </style> </head> <body> <div id="googleversion" class="localexample"> <strong>Local Search</strong> <div id="searchcontrol" style="">Loading...</div> </div> <div id="myversion" class="localexample"> <strong>Map</strong> <div id="gmap_area"></div> </div> </body> </html> Everything works on one server, but not another. Thank you in advance
  14. Right now, the results only show 4 at a time, per page, so I don't think that is too many
  15. I'm trying, unsuccessfully to get a map to show multiple markers with the information that's being grabbed by google. This is what I'm using to pull info from google <script language="Javascript" type="text/javascript"> //<! google.load('search', '1'); function OnLoad() { // Create a search control var searchControl = new google.search.SearchControl(); // Add in a full set of searchers var localSearch = new google.search.LocalSearch(); searchControl.addSearcher(localSearch); // Set the Local Search center point localSearch.setCenterPoint("<?php echo $center; ?>"); // tell the searcher to draw itself and tell it where to attach searchControl.draw(document.getElementById("searchcontrol")); // execute an inital search searchControl.execute("<?php echo $item; ?>"); // Declare function for using results searchControl.setSearchCompleteCallback(this, gotResults); } google.setOnLoadCallback(OnLoad); function gotResults(sc, searcher) { var resultcontent = ''; var resultdiv = document.getElementById('searchresults'); for (i=0; i<searcher.results.length; i++) { var result = searcher.results[i]; resultcontent += '<p>'+result.title+'<br />'+result.streetAddress+'<br />'+result.lng+'<br />'+result.lat+'</p>'; } resultdiv.innerHTML = resultcontent; } //]]> </script> What I need to do now is with the info that's being displayed, resultcontent, take that and place markers on a google map I found this script, but I'm totally lost with how to utilize it <script type="text/javascript"> (function() { window.onload = function(){ // Creating a LatLng object containing the coordinate for the center of the map var latlng = new google.maps.LatLng(<?php echo $starting; ?>); // Creating an object literal containing the properties we want to pass to the map var options = { zoom: 7, center: new google.maps.LatLng(<?php echo $starting; ?>), mapTypeId: google.maps.MapTypeId.ROADMAP }; // Calling the constructor, thereby initializing the map var map = new google.maps.Map(document.getElementById('map'), options); // Creating a marker var marker = new google.maps.Marker({ position: new google.maps.LatLng(40.521622,-81.481115), map: map, title: 'My workplace' }); // Creating an InfowWindow var infowindow = new google.maps.InfoWindow({ content: 'Hello world' }); // Adding a click event to the marker google.maps.event.addListener(marker, 'click', function() { // Opening the InfoWindow infowindow.open(map, marker); }); } })(); </script> Can anybody help me out here? Thanks in advance
  16. <?php $i=1; foreach( $results['results'] as $result ){ print 'Result '.$i.': '.$result['geometry']['location']['lat'].','.$result['geometry']['location']['lng']."\n"; $i++; } ?> Thank you. Exactly what I needed
  17. I got this fixed, now, my next issue how can I get the array Array ( [html_attributions] => Array ( ) [results] => Array ( [0] => Array ( [geometry] => Array ( [location] => Array ( [lat] => 40.522125 [lng] => -81.477138 ) ) [icon] => http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png [id] => 6d56e92588d82f2b97eb3c8d106a89bec2189953 [name] => Bread Head Bakery & Coffee Shop [rating] => 4.2 [reference] => CoQBfQAAANOKqBjJe3JWBRdY5Uc7NmdP-L6O3h_HDnJn3Mm6HGcnWADCJ3BjGB3YAq02fE9FAizTf_H43-GhX1lhdUp2iehFAvV4C-cH_QeZnVlOi3f0SEb48eOYoIWZ6QE-7lVtTW3IXEka7nsO6gMELb2BsFd7sNFT58OdRnaUjap59mQmEhBQ_M4Ztd86Nvr5A8o0z5W2GhTUM2OtHhQjhp301WiD-3l7N5GnLA [types] => Array ( [0] => bakery [1] => cafe [2] => restaurant [3] => art_gallery [4] => store [5] => food [6] => establishment ) [vicinity] => 113 West 3rd Street, Dover ) [1] => Array ( [geometry] => Array ( [location] => Array ( [lat] => 40.52232 [lng] => -81.482009 ) ) [icon] => http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png [id] => 95add20df007d2ae8fbdeaabcf02d3b3e7a0f023 [name] => Dairy Queen [rating] => 3.3 [reference] => CnRqAAAAljDKB4A11DGFSte1LDYfFp3fly5fi9Bp2PgbmNEcwklA3tyHVik8qnB9GHvi08CymHLFOQL19B6HdEQXWB1clChyx6lSdHMk2nSk6nk5tXzwfAjIpfA4MUdoUzjzc9PjpIBm0ngMJUCcYYeJHMXkqhIQbWoTNKYhljBbWFNvlRq0RhoUK33sIdCZIRHdWqzveIfuYPYNyEo [types] => Array ( [0] => store [1] => restaurant [2] => food [3] => establishment ) [vicinity] => 501 North Tuscarawas Avenue, Dover ) to show me just the [lat] and [long] of the results? Thanks
  18. For every search, I get ZERO RESULTS, and I don't understand what I'm doing wrong. <?php require('places_class.php'); $types = $_POST['type']; $location = $_POST['place']; $radius = $_POST['radius']; $gplaces = New GooglePlaces; $gplaces->SetLocation("$location"); $gplaces->SetRadius($radius); $gplaces->SetTypes("$types"); $results = $gplaces->Search(); print_r($results); ?> That's when the form is submitted, I checked the variables, and they are echoing out correctly. Then I thought I'd hard-code the values in, same results <?php require('places_class.php'); $gplaces = New GooglePlaces; $gplaces->SetLocation("40.5267,81.4778"); $gplaces->SetRadius(50); $gplaces->SetTypes("food"); $results = $gplaces->Search(); print_r($results); ?> Here is the class <?php class GooglePlaces { private $APIKey = ""; public $OutputType = "json"; //either json, xml or array public $Errors = array(); private $APIUrl = "https://maps.googleapis.com/maps/api/place"; private $APICallType = ""; private $IncludeDetails = false; //all calls private $Language = 'en'; //optional - https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1 //Search private $Location; //REQUIRED - This must be provided as a google.maps.LatLng object. private $Radius; //REQUIRED private $Types; //optional - separate tyep with pipe symbol http://code.google.com/apis/maps/documentation/places/supported_types.html private $Name; //optional //Search, Details, private $Sensor = 'false'; //REQUIRED - is $Location coming from a sensor? like GPS? //Details & Delete private $Reference; //Add private $Accuracy; public function Search() { $this->APICallType = "search"; return $this->APICall(); } public function Details() { $this->APICallType = "details"; return $this->APICall(); } public function Checkin() { $this->APICallType = "checkin-in"; return $this->APICall(); } public function Add() { $this->APICallType = "add"; return $this->APICall(); } public function Delete() { $this->APICallType = "delete"; return $this->APICall(); } public function SetLocation($Location) { $this->Location = $Location; } public function SetRadius($Radius) { $this->Radius = $Radius; } public function SetTypes($Types) { $this->Types = $Types; } public function SetLanguage($Language) { $this->Language = $Language; } public function SetName($Name) { $this->Name = $Name; } public function SetSensor($Sensor) { $this->Sensor = $Sensor; } public function SetReference($Reference) { $this->Reference = $Reference; } public function SetAccuracy($Accuracy) { $this->Accuracy = $Accuracy; } public function SetIncludeDetails($IncludeDetails) { $this->IncludeDetails = $IncludeDetails; } private function CheckForErrors() { if(empty($this->APICallType)) { $this->Errors[] = "API Call Type is required but is missing."; } if(empty($this->APIKey)) { $this->Errors[] = "API Key is is required but is missing."; } if(($this->OutputType!="json") && ($this->OutputType!="xml") && ($this->OutputType!="json")) { $this->Errors[] = "OutputType is required but is missing."; } } private function APICall() { $this->CheckForErrors(); if($this->APICallType=="add" || $this->APICallType=="delete") { $URLToPostTo = $this->APIUrl."/".$this->APICallType."/".$this->OutputType."?key=".$this->APIKey."&sensor=".$this->Sensor; if($this->APICallType=="add") { $LocationArray = explode(",", $this->Location); $lat = trim($LocationArray[0]); $lng = trim($LocationArray[1]); $paramstopost[location][lat] = $lat; $paramstopost[location][lng] = $lng; $paramstopost[accuracy] = $this->Accuracy; $paramstopost[name] = $this->Name; $paramstopost[types] = explode("|", $this->Types); $paramstopost[language] = $this->Language; } if($this->APICallType=="delete") { $paramstopost[reference] = $this->Reference; } $result = json_decode($this->CurlCall($URLToPostTo,json_encode($paramstopost))); $result->errors = $this->Errors; return $result; } if($this->APICallType=="search") { $URLparams = "location=".$this->Location."&radius=".$this->Radius."&types=".$this->Types."&language=".$this->Language."&name=".$this->Name."&sensor=".$this->Sensor; } if($this->APICallType=="details") { $URLparams = "reference=".$this->Reference."&language=".$this->Language."&sensor=".$this->Sensor; } if($this->APICallType=="check-in") { $URLparams = "reference=".$this->Reference."&language=".$this->Language."&sensor=".$this->Sensor; } $URLToCall = $this->APIUrl."/".$this->APICallType."/".$this->OutputType."?key=".$this->APIKey."&".$URLparams; $result = json_decode(file_get_contents($URLToCall),true); $result[errors] = $this->Errors; if($result[status]=="OK" && $this->APICallType=="details") { foreach($result[result][address_components] as $key=>$component) { if($component[types][0]=="street_number") { $address_street_number = $component[short_name]; } if($component[types][0]=="route") { $address_street_name = $component[short_name]; } if($component[types][0]=="locality") { $address_city = $component[short_name]; } if($component[types][0]=="administrative_area_level_1") { $address_state = $component[short_name]; } if($component[types][0]=="postal_code") { $address_postal_code = $component[short_name]; } } $result[result][address_fixed][street_number] = $address_street_number; $result[result][address_fixed][address_street_name] = $address_street_name; $result[result][address_fixed][address_city] = $address_city; $result[result][address_fixed][address_state] = $address_state; $result[result][address_fixed][address_postal_code] = $address_postal_code; } return $result; } private function CurlCall($url,$topost) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $topost); $body = curl_exec($ch); curl_close($ch); return $body; } } ?> And yes, I do have the correct API Key, I just took it out Can anybody see what the issue is?
  19. I understand that, but how would I incorporate that into this for($i=0; $i < count($_POST['element']); $i++){ $vars = ($_POST['element'][$i] . "<br> "); $mailbody .= $vars; //jQuery results here// echo $mailbody; } Isn't an alert mean it's like a popup and shows me what it has? Like I said, I have no idea how jQuery works, and I'm reading up on the docs, and I'm still lost.
  20. Thank you AyKay47. To be honest, I have no idea how to use that. How would I know what it's grabbing? Can you echo out what it grabbed? I know I sound like a moron, but I haven't the first clue with jQuery
  21. The form is saved like this in the database <div class="element"> <div class="option-container"> <span class="title " style="color:#26ADE4;font-family:Arial;font-size:2.2em;font-weight:bold;">Contact us</span></div> </div> <div class="element"> <div class="option-container"><div class="paragraph " name="element[]" id="element[]" style="color:#000000;font-family:Verdana;font-size:0.8em;font-weight:normal;width:300px;">To contact us, use the form below.<br>We will get back to you as soon as possible.</div></div> </div> <div class="element"> <label id="label-element-3" class="label" style="color:#4DBCE9;font-family:Trebuchet MS;font-size:1.2em;font-weight:normal;"> <span class="labelelementvalue">Email</span> <span class="required">*</span></label> <div class="errormessage" id="errormessage-element-3"></div> <div class="option-container"> <input class="af-inputtext af-email af-formvalue " type="text" name="element[]" id="element[]" value="" style="color:#000000;font-family:Verdana;font-size:0.8em;font-weight:normal;width:260px;border-style:solid; border-color:#dcdcdc;-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border-width:1px;padding:5px;"></div> </div> <div class="element"> <label id="label-element-4" class="label" style="color:#4DBCE9;font-family:Trebuchet MS;font-size:1.2em;font-weight:normal;"> <span class="labelelementvalue">Textarea</span></label> <div class="errormessage" id="errormessage-element-4"></div> <div class="option-container"> <textarea class="af-textarea af-formvalue " name="element[]" id="element[]" style="color:#000000;font-family:Verdana;font-size:0.8em;font-weight:normal;width:300px;border-style:solid; border-color:#dcdcdc;-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border-width:1px;padding:5px;" rows="6"></textarea></div></div> We did not build the way this works, just trying to modify it. Everything works the way we need it to except that part with the span class
  22. The information gets put into the span class when they make the form. So if they put a text field for email, Email will be put into the span class Same thing if they put a textarea and label it Comments, comments will be in the span class This can be done with jquery, or with anything that will pull the info out. I really appreciate any help you can give me
  23. Here's what the send function is if that helps $query = "SELECT recipients,formname FROM appforms WHERE id='$formid'"; $result = mysql_query($query); if($result == false) { user_error("Query failed: " . mysql_error() . "<br />\n$query"); } $row = mysql_fetch_assoc($result); $recpt = $row['recipients']; $formn = $row['formname']; $surname = 'Mobile App Form'; $email = 'noreply@lfa.co'; $header = "From: ". $surname ." <" . $email . ">"; $ip = $_SERVER['REMOTE_ADDR']; $httpref = $_SERVER['HTTP_REFERER']; $httpagent = $_SERVER['HTTP_USER_AGENT']; $today = date("F j, Y, g:i a"); $recipient = $recpt; $subject = $formn; for($i=0; $i < count($_POST['element']); $i++){ $vars = ($_POST['element'][$i] . "\r\n "); $mailbody .= $vars; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.