Jump to content

Glyde

Members
  • Posts

    339
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Glyde's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <?php define("SITE_NAME", "My Website"); print "Welcome to the official website of " . SITE_NAME; ?> Additionally, you can try the following: <?php $name = $_GET['site_name']; print "Welcome to the official website of " . $name; ?> Just access your page via yourpage.php?site_name=website
  2. This isn't so much up to PHP as it is up to you and your customers. Many customers may want an easily portable copy (.pdf), however, sometimes it's much more convenient for the business and customer to just use email and email a copy of the invoice and let the customer do as they wish. I have seen very very few websites use .pdf's for invoices, as most use HTML tables and email, and I think that's the easier and better approach. In the end, it makes really no difference, it's just a matter of convenience.
  3. You could purchase just a domain and have it resolve to your computer which you can use as a server until you get your website working, at which point you can pay for webhosting and upload it. However, creating a server (in most situations) requires installation of software such as Apache/Abyss and PHP, and in addition it usually requires the configuration of a router to allow port forwarding or DMZ to the computer running as a server. Even at that point, some ISP's will limit the amount of upload bandwidth you have to prevent people from hosting a server. In most cases it is easier to have a web host, but if money is a factor, you can always play around locally until your website is ready.
  4. <?php session_start(); if (!is_array($_SESSION['ids'])) { $_SESSION['ids'] = array(); } $_SESSION['ids'][] = $_GET['id']; ?> Are you accessing the id parameter from the url with $id? If so, PLEASE TURN register_globals OFF. It makes your code so much more vulnerable.
  5. You'll need to install a third party extension, as I do not believe PHP ever came out with one. Search google for PHP upload progress and other items such as that which allow you to view details of an object while it is uploading.
  6. Wrong forum. We're here to help you with PHP related issues, and this isn't one. Check the HTML/CSS/JavaScript forums, you'll find the people you want there.
  7. I'm sure there are tons of scripts ready to do this on hotscripts or some other similar, website, however you can easily create your own with fopen, fgetcsv, etc. http://us3.php.net/fgetcsv
  8. What you want is a word-by-word search rather than a full string search. Consider using the FULLTEXT features in MySQL (if available on your server configuration). You can avoid creating many of the search algorithms yourself as MySQL has built in support for quoted phrases, word inclusion (+ word), word exclusion (- word), etc. in FULLTEXT.
  9. Seems like more of an HTML than a PHP problem to me. I think you need to modify your CSS and IMG tags in your HTML to reflect the change in directory.
  10. print $_FILES['html_field_name']['tmp_name']
  11. ALTER TABLE table_name MODIFY updated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
  12. Well first of all for all we know /public_html/temp/tempo.mp3 doesn't exist...why are you moving the file using $upload_path and session_id(), and yet accessing it using a static value?
  13. The nature of cookies is that you can only view and access the ones that were created from your site. To create cookies from PHP, you will need the setcookie or header function, and to access them, you can use the $_COOKIE global variable
  14. Or the seemingly more standardized workaround: print get_magic_quotes_gpc() ? stripslashes($Text12) : $Test12;
  15. The require versus include is not the problem. Require and include are identical with the exception that require will throw a fatal error if the file is not found, while include shows a warning or a notice. The more likely chance is that your function in the required file has invalid formatting. I require files with functions all the time and have never seen one of them act up like you say yours is.
×
×
  • 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.