Jump to content

toivo

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by toivo

  1. If you are using WAMP2, the php.ini file is in c:\wamp\bin\apache\apache2.2.8\bin. Regards, toivo
  2. Hi, It sounds as if your installation file may be corrupted. The script install.php has over 2000 lines. The installation works all right using the latest download of e107 and WAMP2. Regards, toivo
  3. That code does not look like a Joomla template. It refers to e107 which is another CMS. Is that what your site is implemented in?
  4. VirtueMart from http://virtuemart.org is a popular Open Source shopping cart that works with Joomla.
  5. I hope not ;-) Then every phishing site would be doing it. Regards,
  6. You can find some examples through a search in google for: php imap mailbox
  7. Hi, The IMAP functions work well with an Exchange mailbox: http://php.net/manual/en/ref.imap.php Regards,
  8. Hi, The first line checks if the form has been posted by a browser which identifies its type. Mind you, it is possible to use cURL and fake any browser you want. The second line checks if the form has been posted. If the method was GET, the form has probably been displayed by the code earlier and we can now exit. Regards,
  9. You refer to one of the columns as u_LV and u_lv. The identifiers are not case sensitive under Windows or Mac OS X but if your MySQL server runs under Unix/Linux, they are different identifiers and cause your query to fail.
  10. There are mail classes available like PHPMailer from http://phpmailer.codeworxtech.com/ or PEAR::Mail which support attachments.
  11. This is not an error but a notice only, and there are ways to turn them off if you want. Depends on how tidy you want your code to be, of course. Before you refer to the value in the array, you need to check if it is set. Not all user agents set the value for $_SERVER['HTTP_REFERER'].
  12. The shopping cart application in a CMS can be 100 000 lines of code. I would not re-invent a wheel, but it is up to you :-)
  13. Did you try it? My example compares dates, not times:
  14. There is no need to re-invent the wheel: for example VirtueMart at http://virtuemart.org has a PayPal payment module which does exactly the things you want to do.
  15. Even though a website built with PHP can have hundreds of thousands of lines of code, websites do not rely on PHP alone. PHP scripts generate HTML pages which often have also javascript embedded. There are javascript libraries like Mootools, Scriptaculous and jQuery which simplify the creation and manipulation of HTML documents. You could first familiarise with the concept of MVC - Model, View and Controller, to see how websites can be structured. From there it is an easy step to install a Content Management System (CMS) like Joomla and get a flying start in building sites. Joomla has hundreds of extensions which are free. You could run a site with a photo gallery, chat room and support forum in no time, using the application from the Open Source communities. In due course, you can return the favor and publish something you have developed. It is a huge area, and lots of fun. Even with lots of experience in IT in general, I learn new things every day :-)
  16. In a similar situation I cut corners and used jQuery from jquery.com with a handy plugin to manipulate Select lists from http://www.texotela.co.uk/code/jquery/select/
  17. - or try something like this: ... WHERE DATE_FORMAT(Date, '%Y%m%d') = CURDATE();
  18. Have you tried '\r\n', which produces carriage return, line feed?
  19. Hi, from is a reserved word and you need to quote it in backticks if you want to use it as an identifier: `from` Regards, toivo
  20. In your environment the php.ini file is shared. What you were told actually meant that you can have an.htaccess file in your folder where you can put the directives you need. More info at http://php.net/manual/en/ini.php Regard, toivo
  21. It is a gnu-zipped tar file, nothing that WinRAR couldn't handle - if you are a Windows user. Cheers, toivo
  22. Hi, It sounds as if your application would benefit from the capabilities of jQuery AJAX and other functions: http://jquery.com Regards, toivo
  23. Hi, I use FPDF from http://fpdf.org. It works really well and does not need a commercial licence, like PDFlib. Regards, toivo
  24. Your PHP script or HTML page renders the page where your javascript code resides with the current value of the embedded variables. In the javascript example the value of those variables does not change inside the for loop. If you want to make different products accessible to javascript, you need to create an array containing product data and make the array available to javascript. The way to do this is through AJAX queries, for example using the jQuery library. You code can then send a request to a PHP script similar to your current PHP code which returns the data in XML format. The response is then parsed by the jQuery code which makes the data available as a javascript array or variables. Here is an example of how it might work. The PHP script will need to extract the input parameter from the $_POST variable, retrieve the data, build the XML file, issue the header command with 'Content-type: text/xml' and echo the XML data back to the browser. function get_products() { var url = 'get_products.php'; data = 'lines=' + '10'; // request data $.ajax({ type: "GET", url: url, data: data, success: function(xml) { var output = '<p><ul>'; var productid = ''; var imageid = ''; $("line", xml).each(function(i) { productid = $(this).find('ProductID').text(); image = $(this).find('ImageID').text(); output += '<li>img/p/' + image + '-' + productid + '-home.jpg' + '</li>'; }); output += '</ul></p><hr />'; $('#product_list').html(output); // write html to document } }); //ajax }
  25. You only need to sanitize input fields. If you are planning to accept special characters like <a href= and so on, you should perhaps rethink the design of your system.
×
×
  • 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.