toivo
-
Posts
36 -
Joined
-
Last visited
Posts posted by toivo
-
-
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
-
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?
-
VirtueMart from http://virtuemart.org is a popular Open Source shopping cart that works with Joomla.
-
I hope not ;-) Then every phishing site would be doing it.
Regards,
-
You can find some examples through a search in google for:
php imap mailbox
-
Hi,
The IMAP functions work well with an Exchange mailbox:
http://php.net/manual/en/ref.imap.php
Regards,
-
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,
-
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.
-
There are mail classes available like PHPMailer from http://phpmailer.codeworxtech.com/ or PEAR::Mail which support attachments.
-
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'].
-
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 :-)
-
I need to do the comparison (generate a report) from a MySQL date field whose data type is DATETIME..
Meaning it displays date and time as opposed to data type DATE which displays only the date.
Did you try it? My example compares dates, not times:
... WHERE DATE_FORMAT(Date, '%Y%m%d') = CURDATE(); -
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.
-
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 :-)
-
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/
-
- or try something like this:
... WHERE DATE_FORMAT(Date, '%Y%m%d') = CURDATE();
-
Have you tried '\r\n', which produces carriage return, line feed?
-
Code:
$sql2 = "INSERT INTO mailid (mailid, subject, message, from) VALUES ('".$insert."', '".$subject."', '".$message."', '".$from."')";
Error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from) VALUES ('4', 'et', '', 'demouser')' at line 1
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
-
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
-
toivo what is tgz?
It is a gnu-zipped tar file, nothing that WinRAR couldn't handle - if you are a Windows user.
Cheers,
toivo
-
Hi,
It sounds as if your application would benefit from the capabilities of jQuery AJAX and other functions: http://jquery.com
Regards,
toivo
-
Hi,
I use FPDF from http://fpdf.org. It works really well and does not need a commercial licence, like PDFlib.
Regards,
toivo
-
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 }
-
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.
PHP does not recoganize short open tags (<?) tags
in PHP Installation and Configuration
Posted
If you are using WAMP2, the php.ini file is in c:\wamp\bin\apache\apache2.2.8\bin.
Regards,
toivo