Forum: PHP Feb 24th, 2008 |
| Replies: 4 Views: 710 Well, if you're waiting for someone to do your homework for you... you'll probably keep waiting.
Here's a hint, though. Use a loop that will continue to execute until you get to the last person.... |
Forum: PHP Feb 14th, 2008 |
| Replies: 4 Views: 743 You can dynamically check to see whether or not the file was included, and then automatically display the regular page or some other content.
First thing you'll want to do (at least when you're... |
Forum: PHP Feb 14th, 2008 |
| Replies: 36 Views: 3,533 Well, the best way to do that would be to remember the password you used.
In lieu of that, you can log in as the root user and modify the password for the user 'pma' to something new.
Here's... |
Forum: PHP Feb 11th, 2008 |
| Replies: 4 Views: 548 What he's trying to say, is you should never insert user input directly into the database. There are a number of ways a malicious user can use that type of insert statement to hack into your... |
Forum: PHP Feb 9th, 2008 |
| Replies: 5 Views: 2,025 No problem. Always glad to help =)
- Walkere |
Forum: PHP Feb 9th, 2008 |
| Replies: 6 Views: 786 I don't think so. Flash does a good job of wrapping up all the information so that you can't easily manipulate or edit it.
Is there another site for Korean showtimes (like Fandango in the US)? ... |
Forum: PHP Feb 8th, 2008 |
| Replies: 1 Views: 723 If by "data feed" you mean an xml feed/file, then you can access it through PHP using either an XML parser or a pre-built package like SimpleXML.
I'd suggest reading through the section in... |
Forum: PHP Feb 7th, 2008 |
| Replies: 5 Views: 2,025 The easiest way would be to just add an html link to the page. Note that you can easily mix and match php and html on the same page. Just end your php block with a ?> and then print html.
For... |
Forum: PHP Feb 4th, 2008 |
| Replies: 2 Views: 1,482 The link that Naveen posted has a good overview of these OOP concepts.
No, there are no other types - just these three.
As for when to use them... you should always try to use the most... |
Forum: PHP Feb 3rd, 2008 |
| Replies: 8 Views: 694 That would be your best bet. It's particularly hard to help someone that doesn't understand the code at all - so I would always suggest learning the basics before you try and implement someone... |
Forum: PHP Feb 3rd, 2008 |
| Replies: 1 Views: 4,051 In HTML, what you're looking for is the <select> tag. This creates a dropdown list, like...
<select>
<option value="value">Text</option>
<option value="value">Text</option>
</select>
... |
Forum: PHP Feb 3rd, 2008 |
| Replies: 7 Views: 849 Ahh, I thought that you were going to store a bunch (or at least a handful of users).
If you tried to add more records to the file, it would get more complicated to parse the variable names, make... |
Forum: PHP Feb 3rd, 2008 |
| Replies: 7 Views: 849 Should be plenty safe. No one will be able to see the password details, because it will be parsed by the php interpreter. Just like how your mySQL user/password information is floating around... |
Forum: PHP Feb 2nd, 2008 |
| Replies: 7 Views: 849 I'm not sure if this would be the best way to do it...
However, the basic functions you'll need to use are PHP's file functions. The simplest way to do it would be...
$fileContents =... |
Forum: PHP Feb 1st, 2008 |
| Replies: 1 Views: 3,133 You need to do two things here.
First, order the results in descending order, so that the latest entry is first in the list. For this, you can use "ORDER BY userID DESC".
Then, you need to... |
Forum: PHP Feb 1st, 2008 |
| Replies: 2 Views: 773 I agree. That script is entirely unnecessary unless you're locking down Fort Knox.
One simple way to generate a random password would be...
$pw = md5( time() );
$pw = substr($pw, 0, 8);... |
Forum: PHP Feb 1st, 2008 |
| Replies: 16 Views: 2,524 This usually comes from having a missing semicolon. The previous statement was never closed, so PHP isn't ready to begin a new statement - like require_once.
Check that lines 25 and 26 look like... |
Forum: PHP Feb 1st, 2008 |
| Replies: 11 Views: 1,436 You've also got to watch out for scripts that get uploaded to your server and give someone remote access to your file system, db, etc (like this shell script... |
Forum: PHP Jan 27th, 2008 |
| Replies: 2 Views: 1,143 Sometimes you can cut down on it. Other times it's necessary to open and close php tags a lot.
In your case, you can cut down significantly on the opening/closing brackets. In between the... |
Forum: PHP Jan 27th, 2008 |
| Replies: 8 Views: 1,788 So if you were to add this line (#2) ...
$row = mysql_fetch_assoc($result); // note assoc
echo $password . '<br />' . $row['password'] . '<br />';
if ($row['password'] == $password) {
echo "Login... |
Forum: PHP Jan 27th, 2008 |
| Replies: 8 Views: 1,788 How is the password stored in the database?
You say the code works fine without md5 but it doesn't work with md5. When you change the code to encrypt the password, do you also change the database... |
Forum: PHP Jan 27th, 2008 |
| Replies: 1 Views: 1,213 Now you need to execute the query, save the result, and get the values using one of the mysql_fetch functions (mysql_fetch_row(), mysql_fetch_assoc(), mysql_fetch_object() - go to php.net for more... |
Forum: PHP Jan 26th, 2008 |
| Replies: 8 Views: 2,284 I've never set one up on a windows server, but I would assume you would use your ISP's SMTP server. This is usually "smtp.isp.com" or "mail.isp.com" or some such thing. For example, mine is... |
Forum: PHP Jan 26th, 2008 |
| Replies: 8 Views: 2,284 If you didn't set up the smtp settings in your php.ini file, it won't work. Check the SMTP and smtp_port settings.
If you're determined not to use the mail function or need something more... |
Forum: PHP Jan 25th, 2008 |
| Replies: 2 Views: 691 I'm not sure if it's the best idea to just copy and paste a set of functions into a class. Doesn't quite live up to the most rigorous notions of OOP...
More to the point, I don't believe this is... |
Forum: PHP Jan 25th, 2008 |
| Replies: 7 Views: 1,015 I was able to create a border and style a fieldset fine with Firefox. What browser are you using?
If there's a problem with compatibility with a fieldset, you can wrap all of the form elements... |
Forum: PHP Jan 23rd, 2008 |
| Replies: 4 Views: 793 That's the name of the smtp server that I would use (for Optimum Online). You can find the name of the server from your ISP. If you use some kind of pop3 e-mail browser (like Outlook or Evolution),... |
Forum: PHP Jan 22nd, 2008 |
| Replies: 4 Views: 793 There are a couple of ways to do this.
The most direct, permanent and effective way is to edit the php.ini file. If you're running php on a local server (i.e. your computer), then this should be... |
Forum: PHP Jan 22nd, 2008 |
| Replies: 4 Views: 1,570 Yes... and no.
Take a look at the output of this snippet.
$cypher = crypt ( time() );
echo $cypher . '<br />';
echo crypt('password', $cypher) . '<br />';
echo crypt('password1', $cypher) .... |
Forum: PHP Jan 20th, 2008 |
| Replies: 2 Views: 4,268 I was bored, so I wrote up a simple php class to do this type of thing. You can get the source code and some documentation here... |
Forum: PHP Jan 19th, 2008 |
| Replies: 2 Views: 4,268 You should be able to do this with some php.
You can use the strotime() function to turn the date from the table into a timestamp. Then use strotime to turn your start and end dates into a... |
Forum: PHP Jan 19th, 2008 |
| Replies: 4 Views: 1,570 According to this comment on php.net (http://us3.php.net/manual/en/function.crypt.php#47761), certain situations will cause crypt() to only look at the first eight characters.
For example, in this... |
Forum: PHP Jan 19th, 2008 |
| Replies: 2 Views: 600 Properly using private and public properties helps you make better, abstracted OOP code. In simple projects that don't have a heavy dose of OOP, this isn't going to make much difference.
However,... |
Forum: PHP Jan 19th, 2008 |
| Replies: 4 Views: 565 Looks like this is already solved, but here's a related thing to think about.
Do you have php's display_errors flag on? If so, you would have seen an error message, "Headers already sent" or... |
Forum: PHP Jan 18th, 2008 |
| Replies: 3 Views: 6,620 Most of your code seems to be fine, but I'm a little confused as to what the $week_cycle is supposed to do.
I took your code and worked out the example script (at the bottom of this post).
It... |
Forum: PHP Jan 18th, 2008 |
| Replies: 12 Views: 2,770 That is true. The simple mail() function won't work if you need authentication in order to send e-mails.
However, most SMTP servers don't require any type of authentication. If anything, they... |
Forum: PHP Jan 17th, 2008 |
| Replies: 12 Views: 2,770 I assume you mean e-mail the link to the person. If you want to e-mail the actual page, that's a little different...
The most basic way to do e-mail a message would be to use the mail()... |
Forum: PHP Jan 17th, 2008 |
| Replies: 10 Views: 4,108 I used to use an old version of Dreamweaver (MX, I think) and do all my testing online. I tried to set up apache, php and mysql on my local windows machine, but I had a bit of trouble and just said... |
Forum: PHP Jan 16th, 2008 |
| Replies: 7 Views: 10,404 As other people have pointed out, the reason this doesn't work without a <pre> tag is that HTML ignores normal whitespace characters.
The reason it does work with a <pre> tag is that that is what... |
Forum: PHP Jan 15th, 2008 |
| Replies: 4 Views: 1,323 If I understand correctly...
The php script works fine and you received the newsletter.
The newsletter is formatted properly with the HTML.
The problem is that the pictures aren't appearing... |