Jump to content

[SOLVED] newusernotification.php & contactus.php probs


Recommended Posts

I edited a script that lets me know if a new user has registered on my web page by php sending me an email notification. When i inserted this script into the same script that submits the form the new user filled out "contactus.php...only the newusernotification.php works. When i shift the contactus.php script before the newusernotification script....the contactus runs and submits all data into mySQL table created for it.

 

How can i get the two form actions to submit data into the table for new user contacts and at the same time send me an email notification

  •   contactus.php
    • <?php
       
      include "config2.php" ;
       
      // connect to the mysql server
      $link = mysql_connect($server, $db_user, $db_pass)
      or die ("Could not connect to mysql because ".mysql_error());
       
      // select the database
      mysql_select_db($database)
      or die ("Could not select database because ".mysql_error());
       
       
      // insert the data
      $query = "insert into $table values ('".$_POST['contact_name']."', '".$_POST['address']."', '".$_POST['address2']."', '".$_POST['city']."', '".$_POST['state']."', '".$_POST['zip']."', '".$_POST['country']."', '".$_POST['phone']."', '".$_POST['email']."', '".$_POST['r_message']."')";
      $result = mysql_query($query) or die("error: ". mysql_error(). " with query ". $query);
       
      // print a success message
      echo "Your Message Has Been Sent!<br>";
      echo "Now you can <a href=index.htm>return to Our Homepage</a>";
       
    • newusernotification.php
      <?php
      $to = "info@mysite.com"; // The email address you want the notification sent to
      $subject = "A New Member has registered - check Pending Profiles"; // What do you want the subject line of your notification to be?
      $memberSpecs =
      "<hr size=2 width=300 align=left>".
      "<b>Username:</b> ".$_SESSION['username'].
      "<br>".
      "<b>Real Name:</b> ".$_SESSION['firstname']. " ".$_SESSION['lastname'].
      "<br>".
      "<b>IP address:</b> ".$_SERVER['REMOTE_ADDR'].
      "<br>".
      "<b>Date & Time:</b> " .date('l, F j, Y, g:i:s a').
      "<br>".
      "<b>System Specs:</b> ".$_SERVER['HTTP_USER_AGENT'].
      "<br>";
      $headers = "Content-type: text/html \nFrom: New Member Notification";
      $body = "<body>
      <br>
      <table cellspacing=1 cellpadding=2 align=center>
      <tr>
      <td>
      <b><font face=arial size=2>A New Member has registered. </font></b>
      <b><font face=arial size=2>Member's Username, Real Name, IP address and System Specs:</font></b>
      </td></tr>
      <tr>
      <td>
      <font face=arial size=2> ".$memberSpecs." </font>
      </td></tr></table>
      </body>";
      mail("$to", "$subject", "$body", "$headers");
       
      // print a success message
      echo "Your Contact Information Has Been Sent!<br>";
      echo "Now you can <a href=index.htm>return to Our Homepage</a>";
       
      ?>
       
       

I have another form action for newusernotification.php in script...this is the section of what the script looks like. Everything else works but i just want notification immediately the contactus.php completes its task...

 

<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2">

<DIV>

<Form action=contactus.php method=post>

<Form action=newusernotification.php method=post >

<TABLE cellSpacing=3 cellPadding=3 border=0>

<TBODY>

<TR>

<TD align=right>Name:</TD>

<TD><INPUT size=30 name=contact_name></TD></TR>

<TR>

<TD align=right>Address:</TD>

<TD><INPUT size=50 name=address></TD></TR>

<TR>

<TD align=right> </TD>

<TD><INPUT size=50 name=address2></TD></TR>

<TR>

<TD align=right>City:</TD>

<TD><INPUT size=30 name=city></TD></TR>.........

Hi...I'm totally lost with the sessions question. I am totally new to this and I am a better a financial adviser than a programmer but i have decided to do the program myself so i dont pay a programmer everytime i want to edit something. What i did was get a template from a colleague who has similar services, read up a bit of php and edit with dreamweaver. I have designed html websites with dreamweaver but I'm really new to php.

 

This is a complete detail of my Contact_us.html file where the contactus.php and newusernotification is been called. It was my hope that placing the two form actions close would first submit the contact details filled out to the database and immediately notify me of a new registrant simultaneously. As earlier explained...only the action tht is placed first is been carried out. So if i interchange the positions and put the newusernotification.php first...i get a notification but nuthin gets delivered into the db. If i place the contactus.php first...i get a new users info in my db but dont get a notification.

 

So here is the complete script:

<html>

<head>
	<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

	<title>TFS : Contact Us</TITLE>
<META NAME="description" CONTENT=" Contact Us">
<style type="text/css"><!--
body { font-family: arial; color: gray; text-decoration: none; font-size:11px; }
a { font-family: arial; color: gray; text-decoration: none; font-size:12px; }
a:hover    { color: gray; text-decoration: underline }

a.h_nav  { color:white; font-size:12px; font-family: arial;text-decoration: none }
a:hover.h_nav  { color:white; font-size:12px; font-family: arial}
a.h_nava  { color:white; font-size:12px; font-family: arial;text-decoration: none }
a:hover.h_nava  { color:white; font-size:12px; font-family: arial}

-->
</style>	
</head>

<body bgcolor="#ffffff" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
	<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td></td>
			<td>
				<div align="right">
					<img src="images/1.gif" width="387" height="43" border="0"></div>
			</td>
		</tr>
		<tr>
			<td background="images/bg1.gif">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td width="33"><img src="images/bg1.gif" width="33" height="77" border="0"></td>
						<td width="30">  </td>
						<td width="12"><img src="images/bg1.gif" width="12" height="77" border="0"></td>

          <td><p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="5" color="white"><b>FInancial Advise Services
          </b></font><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="5" color="white"><b><br>
			          </b></font><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="white" size="1">We Say Yes!</font></p>            </td>
					</tr>
				</table>
			</td>
			<td background="images/bg1.gif">
				<div align="right">
					<img src="images/2.gif" width="387" height="77" border="0"></div>
			</td>
		</tr>
	</table>
	<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td width="165" background="images/33.gif">
				<div align="center">
					<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#dadada" size="1"><script type="text/javascript"> var d = new Date() 
document.write(d.getDate()+"."+(d.getMonth()+1)+"."+d.getFullYear());</script></font></div>
			</td>
			<td background="images/22.gif" width="20"><img src="images/22.gif" width="20" height="22" border="0"></td>
			<td background="images/22.gif"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#dadada" size="1"><table border=0 cellpadding=0 cellspacing=0><tr><td><img src=images/sep.gif ></a></td><td ><a href=index.htm  class=h_nav  >Home</a></td>
			<td><img src=images/sep.gif ></a></td><td ><a href=Company_Information.html  class=h_nav  >Company Information</a></td><td><img src=images/sep.gif ></a></td><td ><a href=Services.html  class=h_nav  >Services</a></td><td><img src=images/sepa.gif ></a></td><td ><a href=Contact_Us_.html  class=h_nava  >Contact Us </a></td></tr></table></font></td>
		</tr>
		<tr>
			<td width="165" rowspan="2" valign="top" bgcolor="#CFCFCF">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td><img src="images/top.gif" width="165" height="24" border="0"></td>
					</tr>
					<tr>
						<td background="images/mid.gif"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><table border=0 cellpadding=0 cellspacing=0><tr><td ><a href=Home.html ><img src=images/vsepmain.gif border=0></a></td><td><a href=index.htm  class=v_nav  >Home</a></td>
						</tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Company_Information.html ><img src=images/vsepmain.gif border=0></a></td><td><a href=Company_Information.html  class=v_nav  >Company Information</a></td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Services.html ><img src=images/vsepmain.gif border=0></a></td><td><a href=Services.html  class=v_nav  >Services</a></td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Contact_Us_.html ><img src=images/vsepmaina.gif border=0></a></td><td><a href=Contact_Us_.html  class=v_nava  >Contact Us </a></td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Apply.html ><img src=images/vsepmain.gif border=0></a></td><td><a href=Apply.html  class=v_nav  >Apply</a></td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Privacy.html ><img src=images/vsepmain.gif border=0></a></td><td><a href=Privacy.html  class=v_nav  >Privacy</a></td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr></table></font><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b"><b><br>
								</b></font></td>
					</tr>
					<tr>
						<td><img src="images/but.gif" width="165" height="17" border="0"></td>
					</tr>
				</table>
				<br>
      <img src="images/scrap.gif" width="6" height="8" border="0">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td><img src="images/tt2.gif" width="165" height="10" border="0"></td>
					</tr>
					<tr>
						<td background="images/mid.gif">
							<div align="center">
							  <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><form action="search.php" method="post" >
	                            <p> </p>
		                          <p>Username: 
                                          <input type="text" name="username" size="20">
                                          <br>
Password: 
<input type="password" name="password" size="20">
</p>
								</form>	</font>
								<form action="login.php" method="post">
								<input type="submit" name="submitButtonName" value="Log In">
	</form>	</font></div>
						</td>
					</tr>
					<tr>
						<td><img src="images/but.gif" width="165" height="17" border="0"></td>
					</tr>
			  </table>
				<br>
			</td>
			<td width="20" background="images/bg22.gif"></td>
			<td bgcolor="#cfcfcf">
				<p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="1" color="black"></font></p>
			</td>
		</tr>
		<tr>
			<td width="20" background="images/bg22.gif"></td>
			<td valign="top">
				<p><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b"><b>Contact Us<br>
							<img src="images/dots.gif" width="234" height="6" border="0"><br>
						</b></font></p>
				<p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><!--start_search--><DIV style="MARGIN: 0in 0in 0pt">Have questions, give us a call toll free during regular business hours or submit a contact form 24 hours a day 7 days a week.</DIV>
<DIV style="MARGIN: 0in 0in 0pt"> </DIV>
      </font>
				<DIV style="MARGIN: 0in 0in 0pt"><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><STRONG> 
        FInancial Advise Services</STRONG></font></DIV>
                    <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"></font><DIV style="MARGIN: 0in 0in 0pt">
                      
        <p><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
	4242 Lorain Avenue</font></p>
                      
        <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2" color="#3B3B3B">
	Cleveland, Ohio</font><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"> 
	44113<br>
	</font></DIV>
                    <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><DIV style="MARGIN: 0in 0in 0pt"> </DIV>
      <DIV style="MARGIN: 0in 0in 0pt">Toll Free: 1-800-780-8701</DIV>
      <DIV style="MARGIN: 0in 0in 0pt"> </DIV>
      <DIV style="MARGIN: 0in 0in 0pt"></DIV>
<DIV> <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2">PLEASE FILL OUR CONTACT FORM CORRECTLY AND PRESS SE</font>ND ONLY ONCE </DIV>
      </font>
                    <DIV>
                      <p><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Email: 
                        <A href="mailto:info@financialadviseservices.com">info@financialadviseservices.com</A><BR>
                                      </font></p>
                      </DIV>
<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2">
<DIV>
<FORM action=contactus.php method=post> \*****this is to show how they are placed.
<Form action=newusernotification.php method=post >
<TABLE cellSpacing=3 cellPadding=3 border=0>
<TBODY>
<TR>
<TD align=right>Name:</TD>
<TD><INPUT size=30 name=contact_name></TD></TR>
<TR>
<TD align=right>Address:</TD>
<TD><INPUT size=50 name=address></TD></TR>
<TR>
<TD align=right> </TD>
<TD><INPUT size=50 name=address2></TD></TR>
<TR>
<TD align=right>City:</TD>
<TD><INPUT size=30 name=city></TD></TR>
<TR>
<TD align=right>State:</TD>
<TD><INPUT name=state></TD></TR>
<TR>
<TD align=right>Zip Code:</TD>
<TD><INPUT name=zip></TD></TR>
<TR>
<TD align=right>Country:</TD>
<TD><SELECT name="country"> <OPTION value=US selected>United States</OPTION> <OPTION value=AF>Afghanistan</OPTION> <OPTION value=AX>Aland Islands</OPTION> <OPTION value=AL>Albania</OPTION> <OPTION value=DZ>Algeria</OPTION> <OPTION value=AS>American Samoa</OPTION> <OPTION value=AD>Andorra</OPTION> <OPTION value=AO>Angola</OPTION> <OPTION value=AI>Anguilla</OPTION> <OPTION value=AQ>Antarctica</OPTION> <OPTION value=AG>Antigua and Barbuda</OPTION> <OPTION value=AR>Argentina</OPTION> <OPTION value=AM>Armenia</OPTION> <OPTION value=AW>Aruba</OPTION> <OPTION value=AU>Australia</OPTION> <OPTION value=AT>Austria</OPTION> <OPTION value=AZ>Azerbaijan</OPTION> <OPTION value=BS>Bahamas</OPTION> <OPTION value=BH>Bahrain</OPTION> <OPTION value=BD>Bangladesh</OPTION> <OPTION value=BB>Barbados</OPTION> <OPTION value=BY>Belarus</OPTION> <OPTION value=BE>Belgium</OPTION> <OPTION value=BZ>Belize</OPTION> <OPTION value=BJ>Benin</OPTION> <OPTION value=BM>Bermuda</OPTION> <OPTION value=BT>Bhutan</OPTION> <OPTION value=BO>Bolivia</OPTION> <OPTION value=BA>Bosnia and Herzegowina</OPTION> <OPTION value=BW>Botswana</OPTION> <OPTION value=BV>Bouvet Island</OPTION> <OPTION value=BR>Brazil</OPTION> <OPTION value=IO>British Indian Ocean Territory</OPTION> <OPTION value=BN>Brunei Darussalam</OPTION> <OPTION value=BG>Bulgaria</OPTION> <OPTION value=BF>Burkina Faso</OPTION> <OPTION value=BI>Burundi</OPTION> <OPTION value=KH>Cambodia</OPTION> <OPTION value=CM>Cameroon</OPTION> <OPTION value=CA>Canada</OPTION> <OPTION value=CV>Cape Verde</OPTION> <OPTION value=KY>Cayman Islands</OPTION> <OPTION value=CF>Central African Republic</OPTION> <OPTION value=TD>Chad</OPTION> <OPTION value=CL>Chile</OPTION> <OPTION value=CN>China</OPTION> <OPTION value=CX>Christmas Island</OPTION> <OPTION value=CC>Cocos (Keeling) Islands</OPTION> <OPTION value=CO>Colombia</OPTION> <OPTION value=KM>Comoros</OPTION> <OPTION value=CG>Congo</OPTION> <OPTION value=CD>Congo, the Democratic Republic of the</OPTION> <OPTION value=CK>Cook Islands</OPTION> <OPTION value=CR>Costa Rica</OPTION> <OPTION value=CI>Cote D'ivoire</OPTION> <OPTION value=HR>Croatia (local name: Hrvatska)</OPTION> <OPTION value=CU>Cuba</OPTION> <OPTION value=CY>Cyprus</OPTION> <OPTION value=CZ>Czech Republic</OPTION> <OPTION value=DK>Denmark</OPTION> <OPTION value=DJ>Djibouti</OPTION> <OPTION value=DM>Dominica</OPTION> <OPTION value=DO>Dominican Republic</OPTION> <OPTION value=TP>East Timor</OPTION> <OPTION value=EC>Ecuador</OPTION> <OPTION value=EG>Egypt</OPTION> <OPTION value=SV>El Salvador</OPTION> <OPTION value=GQ>Equatorial Guinea</OPTION> <OPTION value=ER>Eritrea</OPTION> <OPTION value=EE>Estonia</OPTION> <OPTION value=ET>Ethiopia</OPTION> <OPTION value=FK>Falkland Islands (Malvinas)</OPTION> <OPTION value=FO>Faroe Islands</OPTION> <OPTION value=FJ>Fiji</OPTION> <OPTION value=FI>Finland</OPTION> <OPTION value=FR>France</OPTION> <OPTION value=FX>France, Metropolitan</OPTION> <OPTION value=GF>French Guiana</OPTION> <OPTION value=PF>French Polynesia</OPTION> <OPTION value=TF>French Southern Territories</OPTION> <OPTION value=GA>Gabon</OPTION> <OPTION value=GM>Gambia</OPTION> <OPTION value=GE>Georgia</OPTION> <OPTION value=DE>Germany</OPTION> <OPTION value=GH>Ghana</OPTION> <OPTION value=GI>Gibraltar</OPTION> <OPTION value=GR>Greece</OPTION> <OPTION value=GL>Greenland</OPTION> <OPTION value=GD>Grenada</OPTION> <OPTION value=GP>Guadeloupe</OPTION> <OPTION value=GU>Guam</OPTION> <OPTION value=GT>Guatemala</OPTION> <OPTION value=GN>Guinea</OPTION> <OPTION value=GW>Guinea-Bissau</OPTION> <OPTION value=GY>Guyana</OPTION> <OPTION value=HT>Haiti</OPTION> <OPTION value=HM>Heard and McDonald Islands</OPTION> <OPTION value=VA>Holy See (Vatican City State)</OPTION> <OPTION value=HN>Honduras</OPTION> <OPTION value=HK>Hong kong</OPTION> <OPTION value=HU>Hungary</OPTION> <OPTION value=IS>Iceland</OPTION> <OPTION value=IN>India</OPTION> <OPTION value=ID>Indonesia</OPTION> <OPTION value=IR>Iran (islamic republic of)</OPTION> <OPTION value=IQ>Iraq</OPTION> <OPTION value=IE>Ireland</OPTION> <OPTION value=IL>Israel</OPTION> <OPTION value=IT>Italy</OPTION> <OPTION value=JM>Jamaica</OPTION> <OPTION value=JP>Japan</OPTION> <OPTION value=JO>Jordan</OPTION> <OPTION value=KZ>Kazakhstan</OPTION> <OPTION value=KE>Kenya</OPTION> <OPTION value=KI>Kiribati</OPTION> <OPTION value=KP>Korea, democratic people's republic of</OPTION> <OPTION value=KR>Korea, republic of</OPTION> <OPTION value=KW>Kuwait</OPTION> <OPTION value=KG>Kyrgyzstan</OPTION> <OPTION value=LA>Lao people's democratic republic</OPTION> <OPTION value=LV>Latvia</OPTION> <OPTION value=LB>Lebanon</OPTION> <OPTION value=LS>Lesotho</OPTION> <OPTION value=LR>Liberia</OPTION> <OPTION value=LY>Libyan Arab Jamahiriya</OPTION> <OPTION value=LI>Liechtenstein</OPTION> <OPTION value=LT>Lithuania</OPTION> <OPTION value=LU>Luxembourg</OPTION> <OPTION value=MO>Macau</OPTION> <OPTION value=MK>Macedonia, the former Yugoslav</OPTION> <OPTION value=MG>Madagascar</OPTION> <OPTION value=MW>Malawi</OPTION> <OPTION value=MY>Malaysia</OPTION> <OPTION value=MV>Maldives</OPTION> <OPTION value=ML>Mali</OPTION> <OPTION value=MT>Malta</OPTION> <OPTION value=MH>Marshall Islands</OPTION> <OPTION value=MQ>Martinique</OPTION> <OPTION value=MR>Mauritania</OPTION> <OPTION value=MU>Mauritius</OPTION> <OPTION value=YT>Mayotte</OPTION> <OPTION value=MX>Mexico</OPTION> <OPTION value=FM>Micronesia, Federated States of</OPTION> <OPTION value=MD>Moldova, Republic of</OPTION> <OPTION value=MC>Monaco</OPTION> <OPTION value=MN>Mongolia</OPTION> <OPTION value=MS>Montserrat</OPTION> <OPTION value=MA>Morocco</OPTION> <OPTION value=MZ>Mozambique</OPTION> <OPTION value=MM>Myanmar</OPTION> <OPTION value=NA>Namibia</OPTION> <OPTION value=NR>Nauru</OPTION> <OPTION value=no problem>Nepal</OPTION> <OPTION value=NL>Netherlands</OPTION> <OPTION value=AN>Netherlands Antilles</OPTION> <OPTION value=NC>New Caledonia</OPTION> <OPTION value=NZ>New Zealand</OPTION> <OPTION value=NI>Nicaragua</OPTION> <OPTION value=NE>Niger</OPTION> <OPTION value=NG>Nigeria</OPTION> <OPTION value=NU>Niue</OPTION> <OPTION value=NF>Norfolk Island</OPTION> <OPTION value=MP>Northern Mariana Islands</OPTION> <OPTION value=NO>Norway</OPTION> <OPTION value=OM>Oman</OPTION> <OPTION value=PK>Pakistan</OPTION> <OPTION value=PW>Palau</OPTION> <OPTION value=PS>Palestinian Territory, Occupied</OPTION> <OPTION value=PA>Panama</OPTION> <OPTION value=PG>Papua New Guinea</OPTION> <OPTION value=PY>Paraguay</OPTION> <OPTION value=PE>Peru</OPTION> <OPTION value=PH>Philippines</OPTION> <OPTION value=PN>Pitcairn</OPTION> <OPTION value=PL>Poland</OPTION> <OPTION value=PT>Portugal</OPTION> <OPTION value=PR>Puerto Rico</OPTION> <OPTION value=QA>Qatar</OPTION> <OPTION value=RE>Reunion</OPTION> <OPTION value=RO>Romania</OPTION> <OPTION value=RU>Russian Federation</OPTION> <OPTION value=RW>Rwanda</OPTION> <OPTION value=KN>Saint Kitts and Nevis</OPTION> <OPTION value=LC>Saint Lucia</OPTION> <OPTION value=VC>Saint Vincent and the Grenadines</OPTION> <OPTION value=WS>Samoa</OPTION> <OPTION value=SM>San Marino</OPTION> <OPTION value=ST>Sao Tome and Principe</OPTION> <OPTION value=SA>Saudi Arabia</OPTION> <OPTION value=SN>Senegal</OPTION> <OPTION value=CS>Serbia and Montenegro</OPTION> <OPTION value=SC>Seychelles</OPTION> <OPTION value=SL>Sierra Leone</OPTION> <OPTION value=SG>Singapore</OPTION> <OPTION value=SK>Slovakia (Slovak Republic)</OPTION> <OPTION value=SI>Slovenia</OPTION> <OPTION value=SB>Solomon Islands</OPTION> <OPTION value=SO>Somalia</OPTION> <OPTION value=ZA>South Africa</OPTION> <OPTION value=GS>South Georgia and South Sandwich Islands</OPTION> <OPTION value=ES>Spain</OPTION> <OPTION value=LK>Sri Lanka</OPTION> <OPTION value=SH>St. Helena</OPTION> <OPTION value=PM>St. Pierre and Miquelon</OPTION> <OPTION value=SD>Sudan</OPTION> <OPTION value=SR>Suriname</OPTION> <OPTION value=SJ>Svalbard and Jan Mayen Islands</OPTION> <OPTION value=SZ>Swaziland</OPTION> <OPTION value=SE>Sweden</OPTION> <OPTION value=CH>Switzerland</OPTION> <OPTION value=SY>Syrian Arab Republic</OPTION> <OPTION value=TW>Taiwan</OPTION> <OPTION value=TJ>Tajikistan</OPTION> <OPTION value=TZ>Tanzania, United Republic of</OPTION> <OPTION value=TH>Thailand</OPTION> <OPTION value=TG>Togo</OPTION> <OPTION value=TK>Tokelau</OPTION> <OPTION value=TO>Tonga</OPTION> <OPTION value=TT>Trinidad and Tobago</OPTION> <OPTION value=TN>Tunisia</OPTION> <OPTION value=TR>Turkey</OPTION> <OPTION value=TM>Turkmenistan</OPTION> <OPTION value=TC>Turks and Caicos Islands</OPTION> <OPTION value=TV>Tuvalu</OPTION> <OPTION value=UG>Uganda</OPTION> <OPTION value=UA>Ukraine</OPTION> <OPTION value=AE>United Arab Emirates</OPTION> <OPTION value=GB>United Kingdom</OPTION> <OPTION value=UM>United States Minor Outlying Islands</OPTION> <OPTION value=UY>Uruguay</OPTION> <OPTION value=UZ>Uzbekistan</OPTION> <OPTION value=VU>Vanuatu</OPTION> <OPTION value=VE>Venezuela</OPTION> <OPTION value=VN>Viet Nam</OPTION> <OPTION value=VG>Virgin Islands (British)</OPTION> <OPTION value=VI>Virgin Islands (U.S.)</OPTION> <OPTION value=WF>Wallis and Futuna Islands</OPTION> <OPTION value=EH>Western Sahara</OPTION> <OPTION value=YE>Yemen</OPTION> <OPTION value=YU>Yugoslavia</OPTION> <OPTION value=ZM>Zambia</OPTION> <OPTION value=ZW>Zimbabwe</OPTION></SELECT></TD></TR>
<TR>
<TD align=right>Phone:</TD>
<TD><INPUT size=25 name=phone></TD></TR>
<TR>
<TD align=right>Email:</TD>
<TD><INPUT size=50 name=email></TD></TR>
<TR>
<TD vAlign=top align=right>Message:</TD>
<TD><TEXTAREA style="WIDTH: 314px; HEIGHT: 79px" name=r_message rows=4 cols=21></TEXTAREA></TD></TR>
<TR>
<TD align=right></TD>
<TD><INPUT type=submit value="Send Message" name=submitButtonName> </TD><td height="52" colspan="2" align="center" ><input type="reset" value="Reset" name="Reset"> </td>
</TBODY></TABLE></FORM></DIV><!--end_search--><br></font><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b"><b><br>
							<br>
						</b></font><img src="images/dots.gif" width="234" height="6" border="0"><br>
      <font color="#3b3b3b" size="1" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b><br>
      </b> <br>
			  </font><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b"><b><br>
						</b></font></p>
			</td>
		</tr>
		<tr>
			<td width="165" background="images/22.gif"><img src="images/22.gif" width="20" height="22" border="0"></td>
			<td width="20"><img src="images/22.gif" width="20" height="22" border="0"></td>

    <td background="images/22.gif"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#dadada" size="1">FInancial Advise Services Copyright 
      © 2007</font></td>
		</tr>
	</table>
	<p></p>
</body>

</html>

firstly that should be posted in the [ code] tags

 

can you attach the

  • newusernotification.php
    contactus.php
    Contact_us.html
    and the
    newusernotification.html (or whatever file called the newusernotification.php)

in Additional Options...

 

files i'll take a peek and see what i can do

sorry about not using the code tags.

 

Those are all the related files. Its just to let the script(newusernotification.php) send me a notification to check info (in the database) on a new registered user sent by contactus.php

 

config2.php

 

<?php
$server = "localhost";	// server to connect to.
$database = "fin_list";	// the name of the database.
$db_user = "fin_admin";	// mysql username to access the database with.
$db_pass = "1234";	// mysql password to access the database with.
$table = "inquiries";		// the table that this script will set up and use.
?>

 

here is contactus.php

 

<?php

include "config2.php" ;

// connect to the mysql server
$link = mysql_connect($server, $db_user, $db_pass)
or die ("Could not connect to mysql because ".mysql_error());

// select the database
mysql_select_db($database)
or die ("Could not select database because ".mysql_error());


// insert the data
$query = "insert into $table values ('".$_POST['contact_name']."', '".$_POST['address']."', '".$_POST['address2']."', '".$_POST['city']."', '".$_POST['state']."', '".$_POST['zip']."', '".$_POST['country']."', '".$_POST['phone']."', '".$_POST['email']."', '".$_POST['r_message']."')";
$result = mysql_query($query) or die("error: ". mysql_error(). " with query ". $query);

// print a success message
echo "Your Message Has Been Sent!
";
echo "Now you can <a href=index.htm>return to Our Homepage[/url]";

 

here is newusernotification.php

 

<?php
$to = "info@financialadviseservices.com"; // The email address you want the notification sent to
$subject = "A New Member has registered - check Pending Profiles"; // What do you want the subject line of your notification to be?
$memberSpecs =
"<hr size=2 width=300 align=left>".
"Username: ".$_SESSION['username'].
"
".
"Real Name: ".$_SESSION['firstname']. " ".$_SESSION['lastname'].
"
".
"IP address: ".$_SERVER['REMOTE_ADDR'].
"
".
"Date & Time: " .date('l, F j, Y, g:i:s a').
"
".
"System Specs: ".$_SERVER['HTTP_USER_AGENT'].
"
";
$headers = "Content-type: text/html \nFrom: New Member Notification";
$body = "<body>


<table cellspacing=1 cellpadding=2 align=center>
<tr>
<td>
<font face=arial size=2>A New Member has registered. </font>
<font face=arial size=2>Member's Username, Real Name, IP address and System Specs:</font>
</td></tr>
<tr>
<td>
<font face=arial size=2> ".$memberSpecs." </font>
</td></tr></table>
</body>";
mail("$to", "$subject", "$body", "$headers");

// print a success message
echo "Your Contact Information Has Been Sent!
";
echo "Now you can <a href=index.htm>return to Our Homepage[/url]";

?>

 

Contact_us_.html

 

<html>

   <head>
      <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
      
      <title>TFS : Contact Us</TITLE>
<META NAME="description" CONTENT=" Contact Us">
<style type="text/css"><!--
body { font-family: arial; color: gray; text-decoration: none; font-size:11px; }
a { font-family: arial; color: gray; text-decoration: none; font-size:12px; }
a:hover    { color: gray; text-decoration: underline }

a.h_nav  { color:white; font-size:12px; font-family: arial;text-decoration: none }
a:hover.h_nav  { color:white; font-size:12px; font-family: arial}
a.h_nava  { color:white; font-size:12px; font-family: arial;text-decoration: none }
a:hover.h_nava  { color:white; font-size:12px; font-family: arial}

-->
</style>   
   </head>

   <body bgcolor="#ffffff" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tr>
            <td></td>
            <td>
               <div align="right">
                  <img src="images/1.gif" width="387" height="43" border="0"></div>
            </td>
         </tr>
         <tr>
            <td background="images/bg1.gif">
               <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tr>
                     <td width="33"><img src="images/bg1.gif" width="33" height="77" border="0"></td>
                     <td width="30">  </td>
                     <td width="12"><img src="images/bg1.gif" width="12" height="77" border="0"></td>
                     
          <td><p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="5" color="white">FInancial Advise Services
          </font><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="5" color="white">

                      </font><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="white" size="1">We Say Yes!</font></p>            </td>
                  </tr>
               </table>
            </td>
            <td background="images/bg1.gif">
               <div align="right">
                  <img src="images/2.gif" width="387" height="77" border="0"></div>
            </td>
         </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tr>
            <td width="165" background="images/33.gif">
               <div align="center">
                  <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#dadada" size="1"><script type="text/javascript"> var d = new Date()
document.write(d.getDate()+"."+(d.getMonth()+1)+"."+d.getFullYear());</script></font></div>
            </td>
            <td background="images/22.gif" width="20"><img src="images/22.gif" width="20" height="22" border="0"></td>
            <td background="images/22.gif"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#dadada" size="1"><table border=0 cellpadding=0 cellspacing=0><tr><td><img src=images/sep.gif >[/url]</td><td ><a href=index.htm  class=h_nav  >Home[/url]</td>
            <td><img src=images/sep.gif >[/url]</td><td ><a href=Company_Information.html  class=h_nav  >Company Information[/url]</td><td><img src=images/sep.gif >[/url]</td><td ><a href=Services.html  class=h_nav  >Services[/url]</td><td><img src=images/sepa.gif >[/url]</td><td ><a href=Contact_Us_.html  class=h_nava  >Contact Us [/url]</td></tr></table></font></td>
         </tr>
         <tr>
            <td width="165" rowspan="2" valign="top" bgcolor="#CFCFCF">
               <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tr>
                     <td><img src="images/top.gif" width="165" height="24" border="0"></td>
                  </tr>
                  <tr>
                     <td background="images/mid.gif"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><table border=0 cellpadding=0 cellspacing=0><tr><td ><a href=Home.html ><img src=images/vsepmain.gif border=0>[/url]</td><td><a href=index.htm  class=v_nav  >Home[/url]</td>
                     </tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Company_Information.html ><img src=images/vsepmain.gif border=0>[/url]</td><td><a href=Company_Information.html  class=v_nav  >Company Information[/url]</td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Services.html ><img src=images/vsepmain.gif border=0>[/url]</td><td><a href=Services.html  class=v_nav  >Services[/url]</td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Contact_Us_.html ><img src=images/vsepmaina.gif border=0>[/url]</td><td><a href=Contact_Us_.html  class=v_nava  >Contact Us [/url]</td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Apply.html ><img src=images/vsepmain.gif border=0>[/url]</td><td><a href=Apply.html  class=v_nav  >Apply[/url]</td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr><tr><td ><a href=Privacy.html ><img src=images/vsepmain.gif border=0>[/url]</td><td><a href=Privacy.html  class=v_nav  >Privacy[/url]</td></tr><tr><td colspan=2> <img src=images/vhsep.gif ></td></tr></table></font><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b">

                           </font></td>
                  </tr>
                  <tr>
                     <td><img src="images/but.gif" width="165" height="17" border="0"></td>
                  </tr>
               </table>
               

      <img src="images/scrap.gif" width="6" height="8" border="0">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tr>
                     <td><img src="images/tt2.gif" width="165" height="10" border="0"></td>
                  </tr>
                  <tr>
                     <td background="images/mid.gif">
                        <div align="center">
                          <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><form action="search.php" method="post" >
                                  <p> </p>
                                   <p>Username:
                                          <input type="text" name="username" size="20">
                                         

Password:
<input type="password" name="password" size="20">
</p>
                           </form>   </font>
                           <form action="login.php" method="post">
                           <input type="submit" name="submitButtonName" value="Log In">
      </form>   </font></div>
                     </td>
                  </tr>
                  <tr>
                     <td><img src="images/but.gif" width="165" height="17" border="0"></td>
                  </tr>
              </table>
               

            </td>
            <td width="20" background="images/bg22.gif"></td>
            <td bgcolor="#cfcfcf">
               <p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="1" color="black"></font></p>
            </td>
         </tr>
         <tr>
            <td width="20" background="images/bg22.gif"></td>
            <td valign="top">
               <p><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b">Contact Us

                        <img src="images/dots.gif" width="234" height="6" border="0">

                     </font></p>
               <p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><!--start_search--><DIV style="MARGIN: 0in 0in 0pt">Have questions, give us a call toll free during regular business hours or submit a contact form 24 hours a day 7 days a week.</DIV>
<DIV style="MARGIN: 0in 0in 0pt"> </DIV>
      </font>
               <DIV style="MARGIN: 0in 0in 0pt"><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><STRONG>
        FInancial Advise Services</STRONG></font></DIV>
                    <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"></font><DIV style="MARGIN: 0in 0in 0pt">
                     
        <p><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
      4242 Lorain Avenue</font></p>
                     
        <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2" color="#3B3B3B">
      Cleveland, Ohio</font><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
      44113

      </font></DIV>
                    <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2"><DIV style="MARGIN: 0in 0in 0pt"> </DIV>
      <DIV style="MARGIN: 0in 0in 0pt">Toll Free: 1-800-780-8701</DIV>
      <DIV style="MARGIN: 0in 0in 0pt"> </DIV>
      <DIV style="MARGIN: 0in 0in 0pt"></DIV>
<DIV> <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2">PLEASE FILL OUR CONTACT FORM CORRECTLY AND PRESS SE</font>ND ONLY ONCE </DIV>
      </font>
                    <DIV>
                      <p><font color="#3b3b3b" size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Email:
                        [email]info@financialadviseservices.com[/email]<BR>
                                      </font></p>
                      </DIV>
<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b" size="2">
<DIV>
<FORM action=contactus.php method=post> <Form action=newusernotification.php method=post >
<TABLE cellSpacing=3 cellPadding=3 border=0>
<TBODY>
<TR>
<TD align=right>Name:</TD>
<TD><INPUT size=30 name=contact_name></TD></TR>
<TR>
<TD align=right>Address:</TD>
<TD><INPUT size=50 name=address></TD></TR>
<TR>
<TD align=right> </TD>
<TD><INPUT size=50 name=address2></TD></TR>
<TR>
<TD align=right>City:</TD>
<TD><INPUT size=30 name=city></TD></TR>
<TR>
<TD align=right>State:</TD>
<TD><INPUT name=state></TD></TR>
<TR>
<TD align=right>Zip Code:</TD>
<TD><INPUT name=zip></TD></TR>
<TR>
<TD align=right>Country:</TD>
<TD><SELECT name="country"> <OPTION value=US selected>United States</OPTION> <OPTION value=AF>Afghanistan</OPTION> <OPTION value=AX>Aland Islands</OPTION> <OPTION value=AL>Albania</OPTION> <OPTION value=DZ>Algeria</OPTION> <OPTION value=AS>American Samoa</OPTION> <OPTION value=AD>Andorra</OPTION> <OPTION value=AO>Angola</OPTION> <OPTION value=AI>Anguilla</OPTION> <OPTION value=AQ>Antarctica</OPTION> <OPTION value=AG>Antigua and Barbuda</OPTION> <OPTION value=AR>Argentina</OPTION> <OPTION value=AM>Armenia</OPTION> <OPTION value=AW>Aruba</OPTION> <OPTION value=AU>Australia</OPTION> <OPTION value=AT>Austria</OPTION> <OPTION value=AZ>Azerbaijan</OPTION> <OPTION value=BS>Bahamas</OPTION> <OPTION value=ZM>Zambia</OPTION> <OPTION value=ZW>Zimbabwe</OPTION></SELECT></TD></TR>
<TR>
<TD align=right>Phone:</TD>
<TD><INPUT size=25 name=phone></TD></TR>
<TR>
<TD align=right>Email:</TD>
<TD><INPUT size=50 name=email></TD></TR>
<TR>
<TD vAlign=top align=right>Message:</TD>
<TD><TEXTAREA style="WIDTH: 314px; HEIGHT: 79px" name=r_message rows=4 cols=21></TEXTAREA></TD></TR>
<TR>
<TD align=right></TD>
<TD><INPUT type=submit value="Send Message" name=submitButtonName> </TD><td height="52" colspan="2" align="center" ><input type="reset" value="Reset" name="Reset"> </td>
</TBODY></TABLE></FORM></DIV><!--end_search-->
</font><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b">

                        

                     </font><img src="images/dots.gif" width="234" height="6" border="0">

      <font color="#3b3b3b" size="1" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">

     

              </font><font size="4" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#3b3b3b">

                     </font></p>
            </td>
         </tr>
         <tr>
            <td width="165" background="images/22.gif"><img src="images/22.gif" width="20" height="22" border="0"></td>
            <td width="20"><img src="images/22.gif" width="20" height="22" border="0"></td>
            
    <td background="images/22.gif"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#dadada" size="1">Financial Advise Services Copyright
      © 2007</font></td>
         </tr>
      </table>
      <p></p>
   </body>

</html>

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.