Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. You could maybe use shuffle with an array if that's what you mean? Edit: To be annoying: Anything is possible, so yes it is possible, but what you are most likely asking is can we show you how?
  2. I thought PHP is read top to bottom, meaning the function would need to be defined first?
  3. O'yer, sorry missed that, then the problem is you are calling a function before you have defined it. e.g. test(); function test() { echo "test"; } ^that won't work but function test() { echo "test"; } test(); Will work
  4. Yer , maybe now you posted the link it might not be .
  5. Mods, how many votes would you want before you create a sticky post with help for syntax errors etc. ????
  6. You haven't got a function called that in the code you showed, unless it is in one of the included files.
  7. O' yer , sorry my bad, missed that line.
  8. I don't think this works $the_array[] = "localhost"; $the_array[] = "root"; $the_array[] = "root"; $conn = mysql_connect($the_array) Because it will do $conn = mysql_connect(array(3)) // or something like this.
  9. Erm,maybe? $aray = array( 1 => 'a', 2 => 'b', 3 => 'c', 4 => 'd', 6 => 'e'); $aray = shuffle($aray);? echo $aray(1); of do an if statement using rand();
  10. Then no, you can't if you use it for the connection. You can merge them together then split them into separate vars. But if you join them it will be like $var1 = "hostusernamepassword"; mysql_connect($var1);// which will look like mysql_connect("hostusernamepassword"); which is missing two params
  11. Erm, so you want to merge them all together, then no that wouldn't be usable then. So as i said, just keep it simple for now until you have a better understanding.
  12. Ok, i know its not your fault, but the question makes no sense, if i was you i would get it working and post any problems you have doing that.
  13. Edit: Solved already.
  14. Solved?,click the bottom left link.
  15. You will get that until you post the form, to fix it try doing if(isset($_POST['namef'])) etc. that kinda thing.
  16. Do you mean $var1 ="one"; $var2 = "two"; $var3= $var1." ".$var2; echo $var3;//prints one two or do you mean $var1 ="hello"; $var1 .= " world"; echo $var1; //prints hello world
  17. sorry, registration.
  18. How are you inserting it, as it may be a problem there?
  19. Just so you know $headers = 'From: My.'r'.Company'; Should of been $headers = 'From: My.'.r.'Company'; Syntax error.
  20. Yes i suppose, but a lot more people ask about syntax errors. And i believe this thread is better here so new members can answer it as well, as they most likely don't look in the other sections.
  21. Ok, i would then suggest maybe doing <?php $content = " <p class=\"bodycontent\"> <table width=\"750\"> <tr> <td valign=\"top\" width=\"350\"> <center> Phone: 678-513-7105<br /> Fax: 678-513-7063<br /><br /><br /> Monday - Friday: 10:00am - 5:00pm<br /> (Close 12:00 noon - 1:00pm)<br /> Saturday - By Appointment Only<br /><br /> Mike (Owner/President)<br /> <a href=\"mailto:mike@vengeancerd.com\">mike@vengeancerd.com</a><br /><br /> Ron Mowen (General Manager/Sales)<br /> <a href=\"mailto:ron@vengeancerd.com\">ron@vengeancerd.com</a><br /><br /> Buddy Daniel (Project Specialist/Technician)<br /> <a href=\"mailto:buddy@vengeancerd.com\">buddy@vengeancerd.com</a><br /><br /> Charlie Hill (Pedders Suspension Specialist)<br /> <a href=\"mailto:charlieh@vengeancerd.com\">charlieh@vengeancerd.com</a><br /><br /> </center> </td> <td align=\"right\"> "; if (isset($_GET['msg'])){ $content .= " Thank you. Your message has been received and will be viewed shortly. "; } else { $content .= " <form method=\"POST\" action=\"site.php?page=contact\" name=\"contact\"> <table> <tr><td valign=\"top\" align=\"right\"> Name: </td><td> <input type=\"text\" class=\"txt\" name=\"namef\" maxlength=\"20\" size=\"20\" value=\"".$_POST['namef']."\" /> </td></tr> <tr><td valign=\"top\" align=\"right\"> Email: </td><td> <input type=\"text\" class=\"txt\" name=\"emailf\" maxlength=\"20\" size=\"20\" value=\"".$_POST['emailf']."\" /> </td></tr> <tr><td valign=\"top\" align=\"right\"> Subject: </td><td> <input type=\"text\" class=\"txt\" name=\"subjectf\" maxlength=\"20\" size=\"20\" value=\"".$_POST['subjectf']."\" /> </td></tr> <tr><td valign=\"top\" align=\"right\"> Message: </td><td> <textarea name=\"messagef\" cols=\"36\" rows=\"4\" class=\"txt\"></textarea> </td></tr> <tr><td></td><td align=\"right\"> <input type=\"submit\" value=\"Send\" /> </td> </tr> </table> </form> "; } $content .= " </td> </tr> </table> <br /><br /> <center> 241 Castleberry Industrial Drive, Suite B<br /> Cumming, GA 30040 <br /> <iframe width=\"425\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&output=embed&s=AARTsJoOEagJWyUHYTOwV8tNEUfVYaHWXQ\"></iframe><br /><small><a href=\"http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&source=embed\" style=\"color:#0000FF;text-align:left\" target=\"_blank\">View Larger Map</a></small> </center> </p> "; ?>
  22. Name: </td><td> <input type="text" class="txt" name="namef" maxlength="20" size="20" value="$_POST['namef]'" /> This is the problem it should be Name: </td><td> <input type="text" class="txt" name="namef" maxlength="20" size="20" value="$_POST['namef']" /> Edit: This is why i said post it, next time you might want to just do it as it will help fix your problem faster.
  23. This is a change! Please if you want help follow peoples advice, these aren't guesses and stabs, it is deduction. Post the changes that causes this.
  24. I think that threads which answer common problems, like mail problems, undefined index, undefined vars etc. should be made sticky so that new users don't keep posting the same problem not knowing what it is. Please, if this does prove that people want this, let us create either one thread answering a lot of these problems, or make some of the answered threads sticky?
  25. You are supposed to wait 12 hours before bumping a thread. Please wait, we are not paid and are doing this out of our spare time, in which we could being selling our services.
×
×
  • 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.