Jump to content

tmyonline

Members
  • Posts

    206
  • Joined

  • Last visited

Everything posted by tmyonline

  1. Guys: I'm implementing a form for user submission. At the end of the form, there is an image that displays some randomly generated code. The user will be required to enter the code shown on this image before he clicks the submit button. This is done to protect the form from spamming, automatic submission. After the submit button is clicked, I need to do this: if ($_POST['the code the user enters'] == the code on the image) { // proceed(); } Any idea on how to get the code displayed on the image ? Thanks.
  2. Hi guys, I would like a capability so that when someone visits these URLs, http://www.domain.com/somedir/xyz.php http://www.domain.com/somedir/info.php they will be respectively re-directed to: http://www.domain.com/somedir/main.php?p=xyz http://www.domain.com/somedir/main.php?p=info Any idea on how to do it in Apache or PHP ? Thanks.
  3. Thanks Pikachu2000 for bringing back my memory. How can I forget trim() ?
  4. Guys: What is the way to remove white spaces in front of a form entry ? Should I use regular expression for this ? Thanks.
  5. Guys: I'm wondering if there is any PHP module and/or framework that I can use for GUI development. Thanks.
  6. Thanks Ken. Would you be a little more comprehensive. What is IMHO and what is modal window ? I did use a little of JQuery in the past but not too much. Thanks again. Hope to hear/receive suggestions from other developers as well. Thanks a lot.
  7. Guys: I would like to create a functionality so that when I click on a link, it will launch and display a form on top of the existing page instead of navigating away to a new page. This form should be displayed at the center of the screen with a certain width and height. How do I achieve this ? I'm not clear whether this is a PHP or JavaScript question. Hope to hear from you. Thanks a lot.
  8. Hello, my Apache was running fine. However, since the time I installed Python and Django, my Apache is no longer running for some reason. In the XAMPP Control Panel, I clicked "Start" on Apache, it said: Status check OK Busy... Apache started but when I went to: http://localhost/myWorkFolder, it showed an empty white screen. Same as I went to http://localhost I looked at the error log at C:/xampp/apache/logs/error.log and found that File does not exist: C:/xampp/htdocs/favicon.ico The file "favicon.ico" is not in the htdocs directory. I don't recall if I mistakenly deleted this file when I cleaned up the htdocs directory. And, I'm not sure if this is the reason why Apache is not running. Any idea ? Thanks so much.
  9. Guys: I need to create an event log. This log is an editor that allows people to type in messages. What I want is that when a user clicks on the event log button, it will not navigate the page away. Instead, it will pop up a mini editor or textarea that allows him to type in a message and submit. This mini editor should be positioned in the middle on the screen. Any idea ? Thanks.
  10. OK kratsg, I'm going to try it first thing in the morning when I'm at work. It does look like a very handy solution, clean and short. If it works, I cannot thank enough!
  11. kratsg, I think this code will fail! I like your idea in attaching the question to the onclick attribute but, think about it, no matter you click "OK" or "Cancel" in response to the question, it will go ahead and do the deletion.
  12. OK, so how do I re-direct the URL then ? I tried window.location.href = "index.php?action=delete&id=" + recordID but it failed to re-direct! Thanks.
  13. kratsg, you are coming down the path that I went through! The thing is, if I do: function deleteInfo(recordID) { var response = confirm("Are you sure you want to delete this record?"); if (response) window.location.href = "index.php?action=delete&id=" + recordID; } It will NOT re-direct the url. I tried it many times this morning. This is what I experienced, if you make the line window.location.href = ... the very first line inside the deleteInfo(), yes, it will re-direct the url. But, the fact that this line is nested inside the if statement, it somehow fails to re-direct. Try it for yourself. That's why I've been so frustrated!
  14. Is it true ? Assuming that it is, is there not a non-Ajax approach as an alternative solution for this ?
  15. AlexWD, thanks for your suggestion. I do believe Ajax is the answer. Unfortunately, I'm in a situation that I have to use a non-Ajax solution although I know Ajax. We are still using PHP 5.1.x which does not have Ajax support. Is there any non-Ajax solution to either call PHP from JavaScript or delete a record, with id = recordID, from database directly ? Thanks.
  16. Guys: Suppose I have the following script: <?php ... echo '<a href="" onclick="deleteInfo('.$id.');">X</a>'; ... ?> // In JavaScript function deleteInfo (recordID) { var response = confirm("Are you sure you want to delete this record"); if (response) how to call PHP from here so that I can delete this record ? Thanks. }
  17. Guys: I'm wondering if there is a PHP method that accepts a date as an argument and returns a boolean value as to whether that date falls on weekend ? Thanks.
  18. Hi guys, I'm wondering if there is any PHP method or class that I can use to output data to a Microsoft Word file. Any idea ? Thanks.
  19. Guys, I'm not sure if this question falls under PHP. Please direct my question to the right section if this is not. Suppose I have some large data stored in MySQL. I need to display this data in a PDF format, in such a way that the header, including logo, and footer appear on every page. The data itself does not contain any information on, or link to, header, logo, footer. Basically, when my manager clicks on a link on the browser, it will display a PDF document so that he can bring it to meetings. Therefore, this data needs to have official letter head, logo, footer,... on every page. So the challenge here is how to break up the data into multiple pages of the same length and insert the header, logo, and footer in between. Any idea ? Thanks.
  20. Thanks guys. I'll look into those links. Thanks again.
  21. Hi guys, My mail form works fine. Now, suppose I need code it so that it allows people to attach a document to their email message. The way I would do, probably not the right way, is to code it so that when the "Send Mail" button is clicked, the attached document will be uploaded to the server and in the message that is sent, I can include a link to that uploaded document. When a user receives the email, he can click on the link to get to the attachment. I have a feeling that this is not the right way. What would be your approach ? Thanks.
  22. Guys, for those of you who have worked with Oracle 10g Express, do you have any idea what to configure in PHP so that it works with Oracle Express and Oracle SQL Developer (the analog of phpMyAdmin) ? Many thanks.
  23. Hi corbin, I store just text (article/story/news in Vietnamese) in the database columns. The reason I think it is the database is because, this time, I used longblob and mediumblob, both of which take a lot of space and memory. How do I turn on the slow query log ? If you don't mind, please visit the site: http://coinguon.us to have some idea how slow it is. I never had a site that slow. Thanks so much.
  24. Guys, I have developed many websites over the last three years but have not encountered a website that is as slow as this current one. The only thing I can think of is probably the way I designed my MySQL tables; for one of the tables, I have set a field to "longblob" and another to "mediumblob". I'm wondering if this is the issue because I never used blob in my previous development. Is it better to use longtext for longblob and mediumtext for mediumblob ? Any idea ? Thanks.
×
×
  • 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.