Jump to content

PHP_TRY_HARD

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by PHP_TRY_HARD

  1. Hi, I am looking for a solution for a project that I am working on. I need to make a datagrid (crud form) but it needs to the results displayed vertically because there are over 100 fields and I want to eliminate side scroll. So the field names would all appear on the left hand side in the first column and then the results each in there own column. I hope what I am saying makes sense? Thank you. Joe
  2. Thanks "Replication" is just what I needed.
  3. I am using an Apache server. I don't need to update every day, just whenever the database changes. The only thing I want is when I update the database I want it to be updated on all servers. Is it safe or even possible to access a database that isn't local host? Database Drive.... I will look into it. Is this something that should be loaded into my cpanel on an Apache server? Thank you all for your suggestions, I need some good advice before I get stuck into this project.
  4. PHP_TRY_HARD

    CSV

    I am fairly new to PHP and I want to get data off another database sitting on a different server. Is the best way to go about this Spit out a CSV every day (automated) Grab that CSV and insert it into the other database (automated) Is this the best way to sync the data? I want to use PHP and mySQL.
  5. I fixed it, I think it is cheating a little but it has given me the result I wanted. I just added the XML code to the headers. $client->setHeaders("<AuthHeader xmlns=\"http://localhost/test/\"><UserName>User123</UserName><Password>Password123</Password><errorMessage></errorMessage></AuthHeader>");
  6. I have the body working now but still struglling with the headers. Any advice?? $SOAPAction = 'http://localhost/test'; //Namespace of the WS. // $AuthHeader = array('TestUser' => $UserName, 'TestPassword' => $Password, '' => $errorMessage); $client = new nusoap_client("https://testWS.asmx?WSDL", true); $headers = new SoapHeader('http://localhost/test', 'AuthHeader', true); I am using nuSOAP
  7. I am making my own SOAP client that needs to call from a preexisting web service. I can access the WSDL that they supplied, so I need to build the SOAPclient backwards. I don't really know what I am doing so would appreciate any help. Thank you in advance. THE WSDL XML POST *****/PriceCalculationWS.asmx HTTP/1.1 Host: ***.***.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://localhost/DriveAwayPriceCalculation/PriceCalculation" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <AuthHeader xmlns="http://localhost/DriveAwayPriceCalculation/"> <UserName>string</UserName> <Password>string</Password> <errorMessage>string</errorMessage> </AuthHeader> </soap:Header> <soap:Body> <PriceCalculation xmlns="http://localhost/DriveAwayPriceCalculation/"> <requestObject> <UserName>string</UserName> <Password>string</Password> <CompanyCode>int</CompanyCode> <MLP>double</MLP> <OptionsPrice>double</OptionsPrice> <DealerDeliveryCharge>double</DealerDeliveryCharge> <DriveAwayCalculationFlag>N or Y</DriveAwayCalculationFlag> <HybridVehicle>N or Y</HybridVehicle> <PrivateOrBusinessUse>P or B</PrivateOrBusinessUse> <VehicleTareWeight>double</VehicleTareWeight> <EngineCapacity>int</EngineCapacity> <NumberOfCylinders>int</NumberOfCylinders> <Postcode>string</Postcode> <CombinedCyclefuelConsumption>double</CombinedCyclefuelConsumption> <InsurerCode>string</InsurerCode> <ElectricVehicle>N or Y</ElectricVehicle> <GVR>char</GVR> </requestObject> </PriceCalculation> </soap:Body> </soap:Envelope> Annd My PHP SOAPclient attempt <?php require_once('nusoap.php'); $client = new nusoap_client('https://****.asmx',true); $auth_array = array( 'user_auth' => array( 'UserName' => 'Username', 'password' => 'Password', 'errorMessage' => 'error processing data', ) ); //Here is where we actually send the data. We are calling the 'login' SOAP method $login_results = $client->call('login',$auth_array); // The following lines will use the set_entry SOAP call to add // a Lead from a mixture of POST variables and hard coded // values, then assign to the authenticated user... $set_entry_params = array( 'module_name' => 'PriceCalculation', 'name_value_list'=>array( array('name'=>'UserName', UserName '), array('name'=>'Password',' Password '), array('name'=>'CompanyCode', '00'), array('name'=>'MLP', 'double'), array('name'=>'OptionsPrice', 'double'), array('name'=>'DealerDeliveryCharge','double'), array('name'=>'DriveAwayCalculationFlag','Y'), array('name'=>'PrivateOrBusinessUse','P'), array('name'=>'VehicleTareWeight','2000'), array('name'=>'EngineCapacity','2600'), array('name'=>'NumberOfCylinders','4'), array('name'=>'Postcode','2600'), array('name'=>'Postcode','value'=>$_POST['Postcode']), array('name'=>'CombinedCyclefuelConsumption','double'), array('name'=>'InsurerCode','767'), array('name'=>'ElectricVehicle','N'))); $result = $soapclient->call('set_entry',$set_entry_params); echo "The Drive Away price for the car is $VehicleDriveAwayPrice"; ?>
  8. So how about dynamic content? If my body contains dynamic content will that content help my rankings even if it is dynamicly loaded from a remote location?
  9. I have been looking over some websites and have noticed they are echoing the keywords from an external php and I am just wondering if this is good for SEO or not? I would think that having the metadata on the individual page would be better? Can you direct the webbots to the keywords.php?
  10. Good point with the email address and I.P. So would I have to delete the multiple entries off the database or is there some code that will check the database for the email address and bounce back an error code saying that they have already applied. I realise that if the email is like you said "awesome@example.com, awesome1@example.com, awesome2@example.com" that I would need to delete the entries.
  11. Thanks I will give it a go. I kind of gave up because I lost all my hair pulling it out but it's time I gave it another go.
  12. I am making a web site that is going to have a competition on it. We want people to only enter once. All of the data will go into a mySQL database. Also to stop people using fake names it might be best to read the computers I.P. so they can only enter once. I have no idea how to go about it, any ideas? Thank you.
  13. No what is "htmlspecialchars() " how do I use them? And I appreciate the help, thank you
  14. Its working now because I forgot a ";" but now it is showing up in my email with all the tags. a snippets is below html><body><p><font face="arial" size="2"><strong>Dear TESTER</strong>,</p><font face="arial" size="2"><p>Thank you for contacting client, we appreciate your comments. An client representative will be in contact with you within the Any one know what Im doing wrong?
  15. I am a web designer and am wondering what is the best program to code PHP in. I am using Dreamweaver at the moment. What program is going to be the most helpful?
  16. Thanks, but the code I am using has lots of funtions on it and I can get it to post but just haveing issues with the email coming out without the HTML formatting. But might use your script in future projects. Thanks
  17. Thank you both for your help once again, I have tried to emulate your code but it still isn't working. is this legal? $message .= ''.$email.''; Here is the code that I tried to fix. //Start Message $message = '<html>'; $message .= '<body>'; $message .= '<p><font face="arial" size="2"><strong>Dear '.$Name.'</strong>,</p>'; $message .= '<font face="arial" size="2">'; $message .= '<p>'; $message .= 'Thank you for contacting Client, we appreciate your comments.'; $message .= ' An Client representative will be in contact with you within the next 2 business days.'; $message .= '<br>'; $message .= '<br>'; $message .= 'The safe collection of your information and your privacy are important to us, as such please visit'; $message .= '<a href="http://www.client.com.au/">www.client.com.au</a> to view our privacy policy in full.'; $message .= '<br>'; $message .= '<br>'; $message .= 'Your Enquiry number is:'; $message .= '<strong>'; $message .= ''.$enq_num.''; $message .= '</strong>'; $message .= '<br>'; $message .= 'Date Submitted'; $message .= ''.$dt.''; $message .= '<br>'; $message .= 'Please Keep this number for future reference.'; $message .= '<br>'; $message .= '</p>'; $message .= '<font face="arial" size="2"><p>Please check your details below for accuracy.</p></font>'; $message .= '<font face="arial" size="2"><strong>Name:</strong>'; $message .= ''.$Name.''; $message .= '<br>'; $message .= '</font>'; $message .= '<font face="arial" size="2"><strong>Email Address:</strong>'; $message .= ''.$email.''; $message .= '<br>'; $message .= '</font>'; $message .= '<font face="arial" size="2"><strong>Address:</strong>'; $message .= ''.$Address.''; $message .= '<br>'; $message .= '</font>'; $message .= '<font face="arial" size="2"><strong>Postcode:</strong>'; $message .= ''.$postcode.''; $message .= '<br>'; $message .= '</font>'; $message .= '<font face="arial" size="2"><strong>User Comments:</strong>'; $message .= '<br>'; $message .= ''.$User_Comments.''; $message .= '<br>'; $message .= '<br>'; $message .= '</font>'; $message .= '<hr noshade color="gray">'; $message .= '<br>'; $message .= '<font face="arial" size="2"> If you wish to change these details, please email us at'; $message .= '<br>' $message .= '<a href="mailto:info@client.net.au">info@client.net.au</a> with your request.'; $message .= '<br>'; $message .= '<br>'; $message .= 'Please print this information and store it for future reference.'; $message .= '<br>'; $message .= '<br>'; $message .= 'Yours Sincerely,'; $message .= '<p>'; $message .= '<strong>client'; $message .= '<br>'; $message .= 'GM - clinet</strong>'; $message .= '<br>'; $message .= 'client'; $message .= '<br>'; $message .= '<font color="gray">'; $message .= 'Phone: (07) 3113 5888'; $message .= '<font color="red">|</font> Fax:(07) 0000 8888'; $message .= '<br>'; $message .= 'address, address</p>'; $message .= '<br>'; $message .= '</font>'; $message .= '<br>'; $message .= '<img src="http://www.client.com.au/client/logo.png">'; $message .= '<br>'; $message .= '</body>'; $message .= '</html>'; //End Message
  18. Thanks, When I used the multipul "$message" it would't even send the mail. I cut the cod down to the bare mininmum and it still wouldn't send. Any Ideas? //Start Message $message = "<html>" $message = "<body>" $message = "<p><font face=arial size=2><strong>Dear $Name</strong>,</p>" $message = "</body>" $message = "</html>";
  19. Thank you for the super quick reply, should I put the tags on their own line? Is this correct? Thank you once again. //Start Message $message = "<html>" $message = "<head>" $message = "<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />" $message = "</head>" $message = "<body>"
  20. I am having lots and lots of trouble! When I send the PHP mail everything works fine except the Text comes through with all the html tags. How can I have it email trough as a nice html email message. I need to pimp my email with a bold font and logo etc. Below is the code. Please help!! :'( //Start Message $message = " <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>You Have Contacted *********</title> </head> <body> <p><font face=arial size=2><strong>Dear $Name</strong>,</p> <font face=arial size=2><p>Thank you for contacting *******, we appreciate your comments. An ******** representative will be in contact with you within the next 2 business days.<br><br>The safe collection of your information and your privacy are important to us, as such please visit <a href=http://www.**********.com.au/>www.**********.com.au</a> to view our privacy policy in full.<br><br> Your Enquiry number is: <strong>#$enq_num </strong><br>Date Submitted $dt <br> Please Keep this number for future reference.<br> </p> <font face=arial size=2><p>Please check your details below for accuracy.</p></font> <font face=arial size=2><strong>Name:</strong> $Name <br></font> <font face=arial size=2><strong>Email Address:</strong> $email<br></font> <font face=arial size=2><strong>Address:</strong> $Address<br></font> <font face=arial size=2><strong>Postcode:</strong> $postcode<br></font> <font face=arial size=2><strong>User Comments:</strong><br>$User_Comments<br><br><br></font> <hr noshade color=gray><br> <font face=arial size=2> If you wish to change these details, please email us at<br> <a href=mailto:info@*******.net.au>info@******.net.au</a> with your request.<br><br> Please print this information and store it for future reference.<br><br> Yours Sincerely, <p><strong>***** ********<br> ** - Marketing and Public Relations</strong><br>**********<br><font color=gray> Phone: (00) 0000 0000 <font color=red>|</font> Fax:(00) 0000 00000<br>0111 ***************** Road **********</p><br></font> <img src=http://www.zzzzzzzzzzzzz.com.au/date.png><br><br><img src=http://www.xxxxxxxxxxx.com.au/logozzzzz/logo.png><br> </body> </html> "; //End Message $to = "info@********.net.au"; // Always set content-type when sending HTML email $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= "From: $yoursite <$youremail>\r\n"; $headers .= "Reply-To: info@*********.net.au\r\n"; $headers .= "Return-Path: info@*********.net.au\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; //Mail the thing mail($email, $subject, $message, $headers); mail($to, $subject, $message, $headers); mysql_close(); header( "Location: $thankyouurl" ); exit(); /*if(mail($to, $subject, $message, $headers)){ echo "success=true"; }else{ echo "success=false"; } */ ?>
×
×
  • 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.