-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Well, you know how to get the make, and you know how to put things into URLs, so... do that. The next page uses $_GET to get the make and runs a query with it. How about giving that a shot? If you have problems, post your code and explain what's going wrong.
-
Why not just change the form to use method=get?
-
Windows-1252 does not have those characters. Whatever you may be doing with conversions, going to or from Windows-1252 will not work.
-
That's not (supposed to be) a problem that you simply find-and-replace your way around. It's being inserted by something, odds are your browser, because you've given it characters to display that aren't valid for the character set you told it to use. Where are you seeing that and what code and/or database do you have behind the scenes powering it?
-
The problem is how you're fetching the data in your code. You can't use an associative array, like $row["description"], because the row has multiple columns named "trans_ref" and "description". You could use another fetch method that lets you refer to each value by column number, which sucks because then you have to keep track of what column has what values, or you can use aliases in your query: SELECT table1.trans_ref AS table1_trans_ref, table1.description AS table1_description, table1.date_paid AS table1_date_paid, table1.recurring AS table1_recurring, table1.amt AS table1_amt, table1.bill_code AS table1_bill_code, table2.trans_ref AS table2_trans_ref, table2.description AS table2_description, table2.amt_deposited AS table2_amt_deposited, table2.deposit_date AS table2_deposit_date FROM table1 RIGHT JOIN table2 ON table1.username = table2.username(named all the columns with "tableN_" for consistency) And I think you should be using a LEFT JOIN, if either at all. Ask yourself what you want to happen (a) if there are rows in table1 with no matching rows in table2, and (b) if there are rows in table2 with no matching rows in table1. How you answer determines whether it's LEFT, RIGHT, or INNER JOIN.
-
Make that link go through a PHP script as well. waitfile.php can handle it too. I figure you can have the same URL as before but with an added value in the query string indicating it's the "click here" link, and you log those requests a little differently.
-
At this point you should be thinking "Undefined method? You mean that mysqli_stmt does not have a 'bind' method? I wonder what methods it does have..." and then heading over to the documentation.
-
Server access logs generally are in a file. But whatever. Make waitfile.php write to a log itself. Build a string with the information you want, like $line = date("m.d.Y h:ia ") . $_SERVER["REMOTE_ADDR"] . $filename;then write to the file with file_put_contents with the append flag. Make sure you don't take the $filename blindly from $_GET - you should make sure it looks valid (like http://site1.com/download/) before writing it to a file.
-
db_connect() never actually returns anything.
-
How about your server access logs?
-
Yeah... I don't really care for Dreamweaver. I could go on a long rant about it (no, really) and other things like it, but suffice it to say: I don't like the habits it teaches. Which is not to say anything about you. Showing initiative is a good thing and everybody has to start somewhere.
-
Take a look at how the recipient, purpose, and description make their way into the HTML: <td width="230" align="left" valign="top"><?php echo($rsBenefactions->getColumnVal("be_recipient")); ?></td> <td width="230" align="left" valign="top"><?php echo($rsBenefactions->getColumnVal("be_purpose")); ?></td> <td width="230" align="left" valign="top"><?php echo($rsBenefactions->getColumnVal("be_nature")); ?></td>It's not particularly good (shakes fist at Dreamweaver) but you need to mirror what it does with $rsBenefactions in your own code. Optionally mirroring the style too: <?php echo($rsBenefactions->getColumnVal("be_index")); ?>You also cannot use smart quotes in code. Probably Dreamweaver's fault again (continues shaking fist).
-
Well, that's Dreamweaver's fault. Actually, how about posting the full PHP code to the entire file? This pointy-clicky bull with Dreamweaver just doesn't cut it.
-
Run download script after x seconds and show message.
requinix replied to alessiaass's topic in PHP Coding Help
And I'm saying, Don't make the download script itself do the waiting. Make whatever page that shows the link, or whatever, do the wait. -
Run download script after x seconds and show message.
requinix replied to alessiaass's topic in PHP Coding Help
You need a separate page that shows the message and has the delay. Ever seen one of those "your download should start in X seconds, click here if it does not" pages? That. <html> <head> <meta http-equiv="Refresh" content="3;url=http://www.example.com/download.php?f=downloadfile.zip"> </head> <body> <p><a href="http://www.example.com/download.php?f=downloadfile.zip">Download</a><p> </body> </html>If the page were more complicated than that, it would take the average user at least a couple seconds to even find where the link is. (The first time.) If you don't want them to even see the link then you can hide it with CSS and do some simple Javascript work to show it. window.setTimeout(function() { // show the link }, 3000); -
What does "locks everything up" mean? What does the HTML source of the page (ie, browser's View Source) show for the link?
-
Undefined index: min in /phpvalidation.php on line 100
requinix replied to ephbaum's topic in PHP Coding Help
[edit] At some point there was a response in here... Something, something, array doesn't have a min in it. [/edit] Can't use header() if there's been output. In this case the output came from that first error message (notice where it said the output started) so when you fix that then this one will go away too. -
Blog comments and what the average user expects from them.
requinix replied to njdubois's topic in Application Design
I expect crude jokes and degrading insults made against the author. ...Oh, that's what you're talking about. User registration: + Lets you track user activity + Encourages the user to give better comments than if they were anonymous + Gives the user an identity they can keep - Requires registration - Makes it harder for someone to offer a quick, one-time comment on your site Anonymous comments (even if they have to enter an email address): + Quick and easy to implement + Quick and easy to use + Anonymous - Harder to moderate a troublesome user - Anonymous -
For everyone else, The query does not, in fact, return anything. So no results.
-
Undoubtedly.
-
Well, let's see: PHP, HTML, CSS, Javascript, TCP/IP, socket programming, Diffie-Hellman. And you'll want to learn about the legality of what you're doing, notably the DMCA. And your hosting provider's terms of service/use policies.
-
... It's BitTorrent. You implement the protocol, or more likely use an existing client to do your work for you, and then wrap whatever service you want around it. If you want to learn how then you need to learn the protocol or at the very least learn about what it even is.
-
Read the error message more carefully. What function does it say is undefined? UPGRADE!
-
Did his cert change? Maybe expire?