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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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)...
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
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...
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...
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...
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...
I can't figure this one out. In a Perl program, here's what I got:
$test = "Two Words";
print "<input type=\"text\" name=\"foo\" value=$test>\n";
When I run the script, instead of getting "Two Words" in the form box, I get just the first word...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.