Jump to content

SephirGaine

Members
  • Posts

    44
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.iptresources.com

Profile Information

  • Gender
    Not Telling

SephirGaine's Achievements

Member

Member (2/5)

0

Reputation

  1. [b]shadowcaster[/b]: Just in the same page will work fine. So preferably, that'll be my route. [b]snorkler[/b]: That was an idea that came to mind, but it seems to be a lot more work than deems necessary. If there's a way to basically have 2 submit buttons on a single form, each leading to different pages, that'll save me time, effort, and probably a bit of frustration to do it that way. If this falls through that's what I'll do however.
  2. Hey ya'll.  Basically, I want to have two submit buttons, each going to a different page. I figure I'll lead one like normal, and have it go to my action="" page. But, my second one I want to go to a seperate page. I understand that Javascript works for this using the onClick tag, but I haven't been able to get it working. So far.. [code]onClick="parent.location='closelead.php'[/code] That's what I'm working with. Any help would be appreciated.
  3. Ah, disregard that, sorry. Got it figured out. What was happening, however, was that when I took out "where Date='$LeadYear2' AND Dead=0 ORDER BY '$LeadSort' ASC"" it would display all the results within that table like it should, and as soon as I placed the rest of the query back in and tried, nothing would show. It was basically just a stupid mistake on my own part, however. Thanks.
  4. Unfortunately I'm not sure what's exactly wrong, but just for troubleshooting goodness, try with a different browser. If that doesn't work, try running the script on a different machine entirely. I'm sure it'll be easier to pin down what the problem is if you can figure out whether it's a problem with the code itself or a system/security/firewall problem. I can imagine a lot of things can prohibit programs from running remotely off of a script.
  5. One more quick question. Having trouble displaying the entries now, narrowed it down to something in my mysql query. I've looked over it too many times to count and I'm not too sure what's wrong, however. [code]"SELECT * FROM Leads where Date='$LeadYear2' AND Dead=0 ORDER BY '$LeadSort' ASC"[/code]
  6. Hola. Just a quick question, should be easy to answer, and needless to say I feel real amateur not knowing the answer. However, I want to echo all data entries from a DB table, however I want to be able to filter through using two variables. One is easy enough, simply use SELECT X from Table WHERE Y=Z. But, I want to use two WHERE variables in the same string. What's the proper way to do so? And if it's actually needed, I need to select these from a certain year, and whether or not they're open tickets at the time. So, for this mini-project, "Date" and "Dead" are going to be my two variables I want to filter through.
  7. Awesome, I'll take a look, thanks. I just found out that I'll end up needing to use it for something else ANYWAYS, but for now I've got the system working OK for what I had originally planned. This'll definitely help me out with the next part, however. Thanks!
  8. Aye, I might just go both routes. For now, just code it using HTML/PHP and then go back at a later date and use Ajax. Reading up a bit on it right now, it's similar to XHMTL, no? If so I know jack about it.. but hey, less than 3 months ago I knew 0 about PHP as well. Thanks for pointing me in the right direction, though!
  9. Ajax, heard of it, not sure what it is. I'll do a quick search, though. I s'pose I can have them submit it and then generate it from there, would probably be quicker (and easier) to populate the fields without having to submit first, though.
  10. Hey ya'll. This is what I want to do. I've got a form where an employee inserts a customer's information for a work order. Ideally, what I want, is for them to be able to save the information into a database. That's the easy part. However, I'm going to have a drop-down list of all the customers we have saved (once again, easy part), but if they choose one of the customers from this list, it automatically fills in the customer information from the database. However, I'm not sure exactly how to do this.. perhaps this is more of an HTML question than PHP. I know how to do everything except for making the form parts automatically fill themselves in depending on which option they choose. So.. any help/guidance/STFU will help. Thanks!
  11. Most unfortunately.. [quote]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT IF(Invoice='Yes','No','Yes')) where work_order_num='2''[/quote] This is what I've got.. [code]<?php   $query = "UPDATE `WOR` SET Invoice=(SELECT IF(Invoice='Yes','No','Yes')) where work_order_num='$ordernum'"   ?>   <?php mysql_query($query) or die(mysql_error()); ?>[/code]
  12. Hate to be a pain, but bumpin' 'dis. Still having a bit of trouble.. see one post up.  ???
  13. Hm.. getting a syntax error when I try it. I get the idea though, so thanks! Changed what you gave me just a bit, came up with this.. [code]<?php   $query = "UPDATE `WOR` SET Invoice=Yes where work_order_num='$ordernum' AND Invoice=No";   $query .= "UPDATE `WOR` SET Invoice=No where work_order_num='$ordernum' AND Invoice=Yes";   ?>   <?php mysql_query($query) or die(mysql_error()); if (mysql_affected_rows() == 0) { echo("An error has occured."); } ?>[/code]
  14. Although I can't exactly pinpoint where you went wrong, I can give you what I'm using for an email form-submittal. Hopefully you can take a look as maybe find out where your code might be off? Might be a little bit messy, but I tried to keep it as clean and simple as possible. [code]<?php $EmailFrom = "myemail"; $EmailTo = "myemail"; $Subject = "Contact Form Submittal"; $Name = Trim(stripslashes($_POST['Name'])); $Company = Trim(stripslashes($_POST['Company'])); $Email = Trim(stripslashes($_POST['Email'])); $Telephone = Trim(stripslashes($_POST['Telephone'])); $Message = Trim(stripslashes($_POST['Message'])); $validationOK=true; if (Trim($Telephone)=="") $validationOK=false; if (!is_numeric($Telephone)) $validationOK=false; if (!$validationOK) {   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";   exit; } $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Company: "; $Body .= $Company; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Telephone: "; $Body .= $Telephone; $Body .= "\n"; $Body .= "Message: "; $Body .= $Message; $Body .= "\n"; $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); if ($success){   print "<meta http-equiv=\"refresh\" content=\"0;URL=success.html\">"; } else{   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">"; } ?>[/code]
×
×
  • 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.