Jump to content

Trizen

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Everything posted by Trizen

  1. i did this for my site to clean up nav, <? $requested = $_GET['p']; if($requested == "policies"){ include ("p.html"); } elseif($requested == "join"){ include ("join.php"); } elseif($requested == "projects"){ include ("projects.php"); } elseif($requested == "progression"){ include ("progression.php"); } elseif($requested == "suggest"){ include ("suggest.php"); } elseif($requested == "Forum"){ include ("Forum.php"); } elseif($requested == "contact"){ include ("suggest.php"); } elseif($requested == "about"){ include ("suggest.php"); } else{ //default page if no $requested include ("home.html"); } ?>
  2. can you just detect if javascript is disabled and instead of doing validation on the app you just have it validate if javascript is working and if not redirect them to a page that says they cant view or use the site without it to reduce the amount of communication?
  3. ok im curious why some people want to make they PHP do the validation when they can do it with Javascript and it will make your code less bulky and your site faster. cause i under the impression less communication with the server and more client side= faster. Im just curious.
  4. ok thanks im not sure yet as the second database has not been setup and im not sure if its going to be on the same server or the backup server. so i will take that into account. Thanks for all your help
  5. i know what you mean about the limit of 100 characters howver i need more information than that to help maybe a sample of what you have done to get my mind in the right place.
  6. dont i need to define dataOne and dataTwo somewhere
  7. all that is doing for the redirect is <meta http-equiv="refresh" content="1; URL=http://www.phpfreaks.com">
  8. need something more to work with, more info is needed
  9. How bout this <?php $dataOne = mysql_connect('localhost','user','pass'); $dataTwo = mysql_connect('localhost','user','pass'); mysql_connect('localhost','user','pass'); mysql_select_db("dataOne"); $query = "INSERT into `sometable` (name) VALUES ('A name'); //Inserts into dataOne"; $r = mysql_query($query); mysql_close($dataOne); mysql_select_db("dataTwo"); $query = "INSERT into `sometable` (name) VALUES ('A name'); //Inserts into dataTwo"; $r = mysql_query($query); mysql_close($dataTwo); ?>
  10. is there anyway to do something like this $link=mysql_connect("localhost", "name", "password", true); $link1=mysql_close($link); $link2=mysql_connect("localhost", "name", "password", true); $mysql_query($qry,$link,$link1,$link2);
  11. or like $link=mysql_connect("localhost", "name", "password", true); $link1=mysql_connect("localhost", "name", "password", true); $mysql_query($qry,$link); $mysql_query($qry1,$link1);
  12. so something like <?php $handle_db1 = mysql_connect("localhost","myuser","apasswd"); $handle_db2 = mysql_connect("127.0.0.1","myuser","apasswd"); mysql_select_db("db1",$handle_db1); mysql_select_db("db2",$handle_db2); $query = "select * from test"; $which = $handle_db1; mysql_query($query,$which); $query = "select * from test"; $which = $handle_db2; mysql_query($query,$which); ?>
  13. i had this type of problem but i kinda pulled a hack per say. i needed a check box for each of the 50 states on a website i did. i used magic quotes and did a $states array. but i think you would need to change the coutrydropdown.php and the inc_viewstore.php to do this. however if you server is running on phpv6 it is not going to work since support for magic quotes is removed but everything under that should still work. <td height="40" colspan="4" align="left"><div align="left">What State or States do you currently accept bail in?</div></td> </tr> <TR></TR> </TABLE> <table width="927" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="157"><div align="left"> <p> <input type="checkbox" name="boxes[]" value="Alabama"/> <span class="style4"> ALABAMA<br> <input type="checkbox" name="boxes[]" value="Alaska"/> ALASKA <br> <input type="checkbox" name="boxes[]" value="Arizona"/> ARIZONA <br> <input type="checkbox" name="boxes[]" value="Arkansas"> ARKANSAS<br> <input type="checkbox" name="boxes[]" value="California"> CALIFORNIA <br> <input type="checkbox" name="boxes[]" value="Colorado"> COLORADO <br> <input type="checkbox" name="boxes[]" value="Connecticut"> CONNECTICUT <br> <input type="checkbox" name="boxes[]" value="Delaware"> DELAWARE <br> <input type="checkbox" name="boxes[]" value="District Of Columbia"> DISTRICT OF COLUMBIA <br> <input type="checkbox" name="boxes[]" value="Florida"> FLORIDA <br> <input type="checkbox" name="boxes[]" value="Georgia"> GEORGIA <br> <input type="checkbox" name="boxes[]" value="Hawaii"> HAWAII <br> <input type="checkbox" name="boxes[]" value="Idaho"> IDAHO<br> <input type="checkbox" name="boxes[]" value="Illinois"> ILLINOIS <br> <input type="checkbox" name="boxes[]" value="Indiana"> INDIANA<br> <input type="checkbox" name="boxes[]" value="Iowa"> IOWA <br> <input type="checkbox" name="boxes[]" value="Kansas"> KANSAS </span><br> </div></td> <td width="148" valign="top"><div align="left"> <p> <input type="checkbox" name="boxes[]" value="Louisisana"> <span class="states style4">LOUISIANA<br> <input type="checkbox" name="boxes[]" value="Kentucky"> KENTUCKY<br> <input type="checkbox" name="boxes[]" value="Maine"> MAINE<br> <input type="checkbox" name="boxes[]" value="Maryland"> MARYLAND<br> <input type="checkbox" name="boxes[]" value="Massachusetts"> MASSACHUSETTS<br> <input type="checkbox" name="boxes[]" value="Michigan"> MICHIGAN<br> <input type="checkbox" name="boxes[]" value="Minnesota"> MINNESOTA<br> <input type="checkbox" name="boxes[]" value="Mississippi"> MISSISSIPPI<br> <input type="checkbox" name="boxes[]" value="Missouri"> MISSOURI<br> <input type="checkbox" name="boxes[]" value="Montana"> MONTANA<br> <input type="checkbox" name="boxes[]" value="Nebraska"> NEBRASKA<br> <input type="checkbox" name="boxes[]" value="Nevada"> NEVADA<br> <input type="checkbox" name="boxes[]" value="New Hampshire"> NEW HAMPSHIRE<br> <input type="checkbox" name="boxes[]" value="New Jersey"> NEW JERSEY<br> <input type="checkbox" name="boxes[]" value="New Mexico"> NEW MEXICO<br> <input type="checkbox" name="boxes[]" value="New York"> NEW YORK<br> <input type="checkbox" name="boxes[]" value="North Carolina"> NORTH CAROLINA </span><br> </p> </div></td> <td width="622"><p><input type="checkbox" name="boxes[]" value="North Dakota"> <span class="style4">NORTH DAKOTA<br> <input type="checkbox" name="boxes[]" value="Ohio"> OHIO<br> <input type="checkbox" name="boxes[]" value="Oklahoma"> OKLAHOMA<br> <input type="checkbox" name="boxes[]" value="Oregon"> OREGON<br> <input type="checkbox" name="boxes[]" value="Pennsylvania"> PENNSYLVANIA<br> <input type="checkbox" name="boxes[]" value="Rhode Island"> RHODE ISLAND<br> <input type="checkbox" name="boxes[]" value="South Carolina"> SOUTH CAROLINA <br> <input type="checkbox" name="boxes[]" value="South Dakota"> SOUTH DAKOTA<br> <input type="checkbox" name="boxes[]" value="Tennessee"> TENNESSEE<br> <input type="checkbox" name="boxes[]" value="Texas"> TEXAS<br> <input type="checkbox" name="boxes[]" value="Utah"> UTAH<br> <input type="checkbox" name="boxes[]" value="Vermont"> VERMONT<br> <input type="checkbox" name="boxes[]" value="Virginia"> VIRGINIA<br> <input type="checkbox" name="boxes[]" value="Washington"> WASHINGTON<br> <input type="checkbox" name="boxes[]" value="West Virginia"> WEST VIRGINIA <br> <input type="checkbox" name="boxes[]" value="Wisconsin"> WISCONSIN<br> <input type="checkbox" name="boxes[]" value="Wyoming"> WYOMING</span> </p> this was my html for the states <?php //firstly grab all the form variables and put them in an array called $form foreach ($_POST as $varname=>$value) { $form[$varname]=$value; if(get_magic_quotes_gpc()) $form[$varname]=stripslashes($form[$varname]); //gets rid of slashes if magic quotes is on } //Build $message $message.=""; //etc etc - fill the other form values //build in states bit $states=array(); foreach ($boxes as $states) { $ylist = $ylist . "'" . $states . "' "; }} $message.="$ylist '\r\n'"; ?> This is to grab it up to do whatever with it print(" <td class=\"viewtext\">{$row['message']}</td>\n"); now i make it print to the page. im not even sure if this will help but this is what i did
  14. ok im kinda new at the database thing, i have always used forms that emailed me... i know im a noob, but now i need a form to post to two seperate databases. 1 for me and one for another office. thanks
  15. i dont want them to vary which it sends to i want it to always submit to both at the same time.
  16. how do i connect to two databases and submit a form to them at the same time?
×
×
  • 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.