Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: salewit
  • Content: Threads
  • Order by date
  1. salewit

    Bug in date count? Or is it me.

    Here's the data: edate name 2007-01-17 Widget-1 2007-01-25 Widget-2 2007-01-04 Widget-3 2007-02-10 Widget-4 2007-02-01 Widget-5 2007-03-01 Widget-6 2007-03-15 Widget-7 2007-03-20 Widget-8 And I enter this command in PHPMYADMIN: SELECT monthname(edate) as mon, year(edate) as yr...
  2. salewit

    Multiple inputs - how to collect dor MySQL

    I've got a database that I want admin people to be able to update. Here's a look roughly at how the database would look to the admin person. Note all fields are editable by user: Train Number | Description | Leaves 17 | Earlybird | 9:10 23 | Rock Island | 12:02 422...
  3. salewit

    Emptying $_POST variables or preventing page reloads

    I've got a simple shopping cart system that doesn't use session variables. Instead data is POSTed from another page. On my final page after payment is retrieved, a receipt is displayed, database stuff is done, logfile stuff is done, and e-mails are sent. I want to either be able to clear $_POST...
  4. salewit

    Negative or positive time difference. How to

    I'm trying to subtract the time in one cell from another. Simple stuff. But I also want a NEGATIVE time displayed in certain situations. I'm trying to calculate arrival information. For example: Due at 17:10. Arrived at 18:20. 18:20-17:10 = 1:10 (late) But if this happens: Due at 17:10...
  5. salewit

    NEWB loop through text

    I know this is probably very simple, but I can't figure it out. I've tried it with a WHILE and a DO loop, and can't get it to work. $string = "This is a test. This is only a test. Testing 123"; $position = strpos($string,"test"); if ($position !== false) { // processes // more processing } How...
  6. salewit

    Print rows based on criteria EXCEL

    I am creating an Excel order sheet with hundreds of items. A customer will go in and enter what they want and then print the order out. I want to print out ONLY those rows where the customer specified a quantity. Is this possible? i.e. Order Form in Excel: Item Descr Price Qty 101 Widget1...
  7. salewit

    Value="" variable in SELECT list

    I have a drop box in a PHP form script that has error checking in it. The user fills out the form, and if there is an error in the form, the user fixes the error, the script is re-run, but I can't seem to "hold" the value of the state drop-down. It defaults back to "Select One". How do I hold...
  8. salewit

    Form value problems

    I've got kind of a weird problem I can't figure out. I've got a form such as: Filename=test.php ------------------------ session_start print "<form action='test.php' method='POST'>"; print "<input type='text' name='foo' value='$foo'>"; print "<input type='submit' value='Go'>"; print...
  9. salewit

    Session variable - pulling hair out!

    I've got ONE session variable that doesn't seem to want to pass over. file1.php <?php session_start(); $ordertotal = $total + $ship + $tax; $ordertotal = round($ordertotal,2); printf ("%01.2f",$ordertotal); session_register("ordertotal"); print "Ordertotal=$ordertotal"...
  10. salewit

    Restoring compressed FAT files to NTFS

    Running Windows Xp Pro and I pulled two hard drives from an old 486 system which has data on it that I need. Both drives appear to have been compressed with DRVSPACE. I can not figure out how to decompress these files onto my NTFS system. Is it possible? The 486 system is long gone, so all I...
  11. salewit

    Session across domains

    I've got a site I'm working on using session variables. My hosting is shared, and at one point must cross into a secure server, so the address will change from say www.domain.com/nextgoestosecure.php to https://secure.servername.com/~user/continue.php. When this happens, I lose my session...
  12. salewit

    Dynamically change ACTION field

    I've got a form where the output of the form will go to 75 possible different places based on the user input. I can't figure out how to dynamically change the ACTION field based on the input. I've got: <form name="formx" action="???" method="post"> <select name="year"> <option>Select...
  13. salewit

    Sending vars to another script w/o form

    This is going to be a tough problem to describe. I have a PHP script that collects information from a form, then redirects to a password protected archive (Mailman). I need to send the username and password (to MailMan), but I can't do it in the FORM tag because I can't create the form tag until...
  14. salewit

    Test for successful MySQL delete

    I got this straight out of my PHP book yet regardless of the value of $userid it ALWAYS comes out TRUE ($result=1). Is there a typo in my book? The code does work when the userid is correct. $selstate = "DELETE from userdb WHERE username = '$userid'"; $result = mysql_query($selstate,$linkID)...
  15. salewit

    Shop cart W/O sessions/cookies... possible?

    I have several end users of my shopping cart that will have cookies disabled, or will be behind a firewall that won't allow cookies. Is there any way to do a shopping cart WITHOUT sessions or cookies? If so, how do I identify someone from page to page? Thanks Sam
  16. salewit

    Sessions/Cookies very confused

    Ok, I'm pretty new to PHP and took on the ambitious assignment of writing a shopping cart program with MySQL. I'm using session variables to identify a user from page to page. Everything works wonderfully. Except for the big boss 3000 miles away who tried it and couldn't log in. So suspect...
  17. salewit

    Session HELL

    Ok, I'm trying to create a script kind of like a shopping cart. No money or private information involved. Just collecting data and e-mailing it on. Everything was working great. I was using a program called PhPSecurePages to handle the authentication. I was also snagging the Session ID to help...
  18. salewit

    Assoc Array madness

    Newbie question here... I'm sure it's so simple, but I'm getting a massive migraine from it. I've got a MySQL database with this info in it: Model Qty -------------- 1120-7 5 1120-2 23 2838-1 3 I want to assign this into an array out of the database as such: $ytd = array...
  19. salewit

    MySQL Multiple Queries

    I'm fairly new to MySQL and very new to PHP. I'm trying to access multiple tables, but it's just too hairy for me to do in one call. But I tried multiples and it isn't working. This message here further confuses me: http://www.tek-tips.com/viewthread.cfm?SQID=336190&SPID=434&newpid=434&page=1...
  20. salewit

    Weird Perl problem w/HTML

    I can't figure this one out. In a Perl program, here's what I got: $test = &quot;Two Words&quot;; print &quot;<input type=\&quot;text\&quot; name=\&quot;foo\&quot; value=$test>\n&quot;; When I run the script, instead of getting &quot;Two Words&quot; in the form box, I get just the first word...

Part and Inventory Search

Back
Top