Jump to content

delirium

Member
  • Posts

    15
  • Joined

  • Last visited

Everything posted by delirium

  1. Hey there, I have two email forms on http://www.supernerd.ca/contact.php and no matter which one you fill out they both give you the success message in green. They use the same code but with all different variables and stuff. Why is this happening and how to i make it so only the one that is being submitted returns the message.. here is the code for both, the one on the left <? $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $phone = $_REQUEST['phone'] ; $adress = $_REQUEST['adress'] ; $type = $_REQUEST['type'] ; $service = $_REQUEST['service'] ; $subject = "Appointment Request From Supernerd.ca" ; $message = " Name: "."$name"." Email: "."$email"." Phone Number: "."$phone"." Adress: "."$adress"." Type: "."$type"." Service: "."$service"." "; if (isset($_REQUEST['email'])) <------ THIS IS WHERE THE ERROR HAPPENS //if "email" is filled out, send email { mail( "pj@supernerd.ca", "$subject", $message, "From: $email" ); echo "Thanks!, Someone will be in touch with you within 24 hours"; } else{ ?> Fill out the form bellow to setup an appointment <? } ?> the one on the right: <? $nameRIGHT = $_REQUEST['nameRIGHT'] ; $emailRIGHT = $_REQUEST['emailRIGHT'] ; $mess = $_REQUEST['mess'] ; $subjectRIGHT = "General contact From Supernerd.ca" ; $messageRIGHT = " Name: "."$nameRIGHT"." Email: "."$emaiRIGHT"." Message: "."$mess"." "; if (isset($_REQUEST['emailRIGHT'])) <----- AND HERE, YET THEY ARE BOTH NAMED DIFFERENT THINGS..??? { mail( "pj@supernerd.ca", "$subjectRIGHT", $messageRIGHT, "From: $emailRIGHT" ); echo "Thanks!, Someone will be in touch with you within 24 hours"; } else{ ?> Fill out the form bellow to send us an email <? } ?> As you see where i have put arrows, the names are completely different yet they BOTH return the success message..
  2. ah gotcha thanks! I really wish they would just make them all the same. It would save everyone alot of time.
  3. Fuck it, im using a conditional comment. Too much work messing with cross browser stuff.
  4. Alright, i just fixed the part under the logo. but the last tab on the right is still going to the left.. Does firefox have some weird default 1px margin or something like that?
  5. Hey there, im getting so annoyed with this cross-browser stuff. Why the hell aren't they all just the same!!!!! Anyway, i'm working on this website layout and everything is going fine in IE but in Firefox one little thing is off by like 1 pixel. Right under the logo, the entire tab area seams to be to far to the left, by about one pixel. I am a perfectionist so this is actually driving me crazy. I've been stuck for 3 days trying to figure this out, can somebody PLEASE help me. the website is http://www.supernerd.ca and the css: http://www.supernerd.ca/css/main/style.css Thanks in advance, -Delirium
  6. Hey guys, I have a "submit Support Ticket" form that is built up of about 20 radio buttons and all my services. Witch looks something like.. ( O represents a radio button ) Service Type: | O In home O Drop off ------------------------------------------------------------ Service: | O Computer repair | O othr service | O Other service | O wireless network setup Now, most of my services can be done both in home and by drop off. However things like wireless network setup must be done in home. I would like to make it so that when the user checks the "in home" box, they are not able to select these services. I have had a few ideas on how i could go about doing this but i would like some other opinions before i do anything. At the moment i have it return as a form error, so if they have checked say, "Drop Off" Service type.. and "wireless network setup" as the service. It submits the form but than sends the user back saying "Error this service cannot be done in home", id like it to happen before they submit the form. (this is also posted in javascript, but id really like to find a way to do it in php)
  7. Thanks alot! It works great now
  8. Hey guys, im trying to get my webpage to display the number of "support tickets" that the user has. Here is the code(session->username is self explainitory): $getstickets = mysql_query( "SELECT * FROM `sticket` WHERE `username` = '$session->username'" ); $result = mysql_query($getstickets); mysql_num_rows($result); echo mysql_num_rows($result); But it keeps saying mysql_num_rows() supplied argument is not a valid mySQL result resource. Can anyone tell me what im doing wrong?
  9. Thank you so much, just needed that explenation.
  10. Hey, im starting to get really into php but im not completely familiar with all the code yet. I had my cousin type this up for my login system and its a comment/Guestbook thing. It works but im really not sure how and i would love to understand whats happening in this code. Could anyone please go through the code and explain whats happening? The code is below, but here is an example of what im looking for.. $message = htmlspecialchars(addslashes("$_POST[message]")); **This sets the variable "$message"** Ideally i would like en explanation like that for every line, thanks so much in advance. ______________________________________________________________________________ //submit comment switch ($_GET['page']) { case 2: if(isset($_GET["sign"])) { $message = htmlspecialchars(addslashes("$_POST[message]")); $time = date("F j, Y, g:i a"); $querty = mysql_query("INSERT INTO guestbook(owner,postedby,post,time) VALUES('$req_user','$session->username','$message','$time')");echo " Your message has been posted "; } else {echo ( "Message was not posted" ); // or no request sent } break; } // Display comment system $req_user = trim($_GET['user']); $getcomments = mysql_query( "SELECT * FROM `guestbook` WHERE `owner` = '$req_user' ORDER BY `ID` DESC" ); while ($comments = mysql_fetch_array($getcomments)) { echo "$comments[postedby] ($comments[time]) - $comments "; } //Display comment submit box echo " Sign $req_user's guestbook "; /* Link back to main */ echo " Back To [Main] "; ?> This is the line i really dont get, What page is that? i have a userinfo.php but what all the ?page= stuff.. i know its a HUGE part of php but i'm really new to this..
  11. Alright thank you guys. And regarding the line breaks, i am only putting them there to get an idea of what the site will look like. Once i get it how i like it il go back and clean all that stuff up. I know its a stupid way to do it but it works for me
  12. hey, im having some trouble with cross-browser compatibility latley. On my website i have a navbar that looks fine in IE but is messed up in any other browser! Ugh i wish they where all the same. But if have exercised every possibility and i am totally stumped. If you guys could lend me a hand that would be great. Here is my website: http://www.GotoGeeks.ca Here is my CSS: http://www.GotoGeeks.ca/css/style_main.css Thanks alot guys!
  13. Hey, I'm having a problem with this space between my divisions in Firefox. Here is my website: http://www.gotogeeks.ca Here is my CSS: http://www.gotogeeks.ca/css/style_main.css The Header is spaced about 15 pixels away from my body, but all my divisions use the same coding and none of the others are giving me any trouble. Any ideas?
×
×
  • Create New...