|
Hi Spawn 2004 I wanna help.
to create a simple from use,
index.php
<title> Simple Form
post.php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="books"; // Database name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
Next insert name into the database you wish
|
|
|
|
|
Currently I am hosting a clients webpage on the free plan of Mezoka. They allow php 5, but not phpmail (), is there a way of that I can let users email the client at their Gmail account through the website? I read on the Mezoka forum that you could use Gmail as am smtp. I've included my php and html form. I've had a few people tell me about php mailers and php mailer class. Not too sure how to go about implementing the contact form. What I did and thought would work, doesnt, I keep getting the error message that I have in my php. I've tried using Gmail which is where the client has their email account with and my personal yahoo address, and error messages.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Contact</title>
</head>
<body>
"; $to = "starr@yahoo.com";
$from = " <no-reply@sitename.info >";
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: $from\r\n";
$mail_body = "Hello World";
if (mail($to,"Mail", $mail_body,$headers))
{ echo " Thank you! - Your feedback has been sent! "; }
else
{ echo " Thank you! - We could not send email. Please try later! "; }
?>
?>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Contact</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="templatemo_wrapper">
<div id="templatemo_header">
<ul id="social_box">
<li><a href="http://www.facebook.com/"><img src="images/facebook.png" alt="facebook" /></a></li>
<li><a href="http://www.twitter.com/"><img src="images/twitter.png" alt="twitter" /></a></li>
</ul>
<div id="site_title">
<h1><a href="index.htm"><img src="images/logo2.png" alt="logo" /><span></span></a></h1>
</div> <!--
</div> <!--
<div id="templatemo_menu">
<div class="home"><a href="index.htm"></a></div>
<ul>
<li><a href="index.htm"><span>Home</span></a></li>
<li><a href="test.htm"><span>Test</span></a></li>
<li><a href="examples.htm"><span>Examples</span></a></li>
<li><a href="question.htm"><span>Questions</span></a></li>
<li><a href="contact.htm"><span>Contact</span></a></li>
<li><a href="comments.htm">Have A Comment?<span>Comments</span></a></li>
</ul>
</div>
<!--
<div id="templatemo_content_wrapper">
<div id="templatemo_content_top"></div>
<div id="templatemo_content">
<h2>Contact</h2>
<div class="cleaner_h50"></div>
<div id="contact_form">
<h4>Quick Contact</h4>
<form method="post" name="contact" action="email.php">
<div class="col_w340 float_l">
<label for="namer">Name:</label> <input name="name" type="text" class="input_field" id="author" maxlength="40" />
<div class="cleaner_h10"></div>
<label for="email">Email:</label> <input name="email" type="text" class="input_field" id="email" maxlength="40" />
<div class="cleaner_h10"></div>
</div>
<div class="col_w340 float_r">
<label for="text">Message:</label> <textarea id="text" name="text" rows="0" cols="0" class="required"></textarea>
<div class="cleaner_h10"></div>
<input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Send" />
<input type="reset" class="submit_btn float_r" name="reset" id="reset" value="Reset" />
</div>
</form>
</div>
<div class="cleaner"></div>
</div>
<div id="templatemo_content_bottom"></div>
</div>
<div id="templatemo_sp_box">
<div class="col_w340 float_l">
</div>
</div>
<div class="col_w340 float_r">
</div>
</div>
</div>
<div id="templatemo_footer">
Copyright © 2011 <a href="www.twitter.com/">Starr</a><br/>
<a href="http://www.iwebsitetemplate.com" target="_parent">Website Templates</a>
by <a href="http://www.templatemo.com" target="_parent">Free CSS Templates</a>
</div> <!--
</div> <!--
</body>
</html>
|
|
|
|
|
Check the link out at the bottom, it's a PHP mailer library that should make it much easier to do what you're trying to accomplish.
If you're still having trouble, just remember, Google is your friend! http://bit.ly/p9DUif[^] Literally every result on that first page should walk/help you through it.
http://swiftmailer.org/[^]
|
|
|
|
|
You can check out PhpClasses for a Php Smtp Library that communicates to Google Mail via network functions.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
I am new to python, django and wing ide. I come from .net. I need to debug a django web app and I am not sure where the entry point is so I can start debugging right from the beginning. Please advise.
Does the app have to be in the mysites folder i configured during the configuring django? Or it can be anywhere?
I have __init__, main, manage, settings, settings_local and urls files in the initial directory of this app.
Thanks,
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
just turn on the debug option in settings.
why not use eclipse instead of wing?
|
|
|
|
|
Hello everyone,
I have recently started a website which tells visitor's IP address,location and other details. I intend to add some more functions to the website. I would like to know if there is any way to find ISP(Internet Service Provider) of the visitor using PHP.Click the link below to view the site:
Show IP
Please help ASAP.
Regards,
Wasif K.
|
|
|
|
|
You could play around the host area on your site. I know mine displays "comcast.net" in it with some other things before it (IP address, location, etc.). You could do some figuring that way.
modified on Sunday, September 4, 2011 1:41 AM
|
|
|
|
|
|
Hi all
Iam A Php Developer I Wish To Develop a website for live video streaming and video uploading and downloading just like www.freeonsmash.com[^]
I Want to know which kind of server i purchase what are the server requirements
Please Help me to know this
Thank you
Arunkumar.T
Life is too short to be spent in nursing animosity or registering wrongs.
|
|
|
|
|
A linux server would be best. Install ffmpeg on the box and have a cron job run every few minutes to convert any video uploads to flv format for displaying.
As for a player, I would recommend Flowplayer (http://flowplayer.org[^]) It is very easy to operate and a commercial license isn't all that expensive.
|
|
|
|
|
|
Use date-default-timezone-set()[^] early in your PHP. That will set PHP time correctly. I don't know how you would set the SQL server time - maybe it has a similar function.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
|
Thanks. I was pretty sure that it should exist, but didn't know the details (and, to be honest, didn't have the energy to google it). I'm familiar with the PHP one because I work with Apache servers running on 3 different timezones that should all appear to be local.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
You can use php timestamp
|
|
|
|
|
Hi,
You can set the default time zone by using
date_default_timezone_set()
or by
string date ( string $format [, int $timestamp = time() ] )
for more details please see
http://php.net/manual/en/function.date.php[^]
Thanks & Regards
Arya1685
"You are not only responsible for what you say, but also for what you do not say"
|
|
|
|
|
Hello!
I am using Mystique 3.0.7 theme. I just want to ask that how could I make Parent page link not clickable that whenever I place a mouse over that it just show me the sub pages (child pages) under it.
Parent Page: MU|T|MED|A
site : http://www.bani-hafiz.com/mutmeda/[^]
Thank you!
|
|
|
|
|
Hello frndz,
I am trying to connect with web service using SOAP via CURL. I successfully connect with the web service but i am getting following error.
Does any one knows about such kind of error?
Length Required
HTTP Error 411. The request must be chunked or have a content length.
|
|
|
|
|
Basically, the server is telling you that it cannot determine where your input is going to end. You must either
1. use chunked encoding (which has delimiters so the server can parse the incoming stream and detect the logical end of this message) or
2. send a content-length header up front so it can count bytes to detect the end of the message.
It's in the nature of TCP/IP that the application must have a way of delimiting messages - the protocols don't.
Peter
ps At Code Project, we are not 'frndz', whatever else we might be.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Hi peter,
Thnx for quick response.
I checked my code, I am already passing the Content-length
following is the code.
$header = array(
"POST /XXXX.asmx HTTP/1.1\r\n",
"Host: demo.XXXX.in\r\n",
"Content-Type: text/xml; charset=utf-8\r\n",
"Content-length: ".strlen($soap_request)."\r\n",
"SOAPAction: \"http://tempuri.org/VerifyLogin\"\r\n",
);
But still i am getting the same error.
i found that i am gettin above error in Chrome and Mozilla but in IE6 am getting something like
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Invalid at the top level of the document. Error processing resource
Do You have any idea about these?..
Thanx in advance.
|
|
|
|
|
I don't understand what browsers have to do with it, if you're running PHP code to access SOAP.
I can only come back with my "standard" reply to all "What's happening over a network?" questions. Get Wireshark on the job. Record successful (if any) and unsuccessful exchanges and compare the traces.
Good hunting!
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
I was told this would work, but it is not. I do not know the value in a particular column, but I want to decrease it by a number.
In other words, Dude buys 2 widgets, the inventory of said widget gets reduced by two.
$u_sql='UPDATE sale_inventory SET invqty = invqty - '.$boughtqty.' WHERE invProdID='.$row['ProdID'];
This yields an SQL Statement like:
UPDATE sale_inventory SET invqty = invqty - 1 WHERE invProdID=1234567
I cannot tell why this is not working.
Thanks in advance.
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
The SQL looks fine. Could you show the PHP code that executes the SQL?
|
|
|
|
|
do you have an error message, can you use something like..
$rst = mysql_query($u_sql) or die(mysql_error());
this will print the message coming from the mysql db.
Chris J
www.redash.org
|
|
|
|