- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: Hi Michael, Why haven't you considered one of the many e-commerce packages which are available, e.g. WordPress and WooCommerce, Magento, etc? | |
I am trying to put together a web interface for a process which downloads a number of XML files and then processes them. I am usimg JavaScript / jQuery / AJAX to initiate the process on the server, one file at a time, and to display progress information after each … | |
Hi, I installed Virtualmin GPL on a new Ubuntu 12.04LTS virtual server, and as part of the process generated a self signed certificate which all worked swimmingly. However, I got the "You attempted to reach nh03.netthost.co.za, but the server presented a certificate issued by an entity that is not trusted … | |
Re: That's because $_FILES is an array. To see the content of an array in your email, you would need to do something like: [CODE] $uploadedFileDetails = var_export($_FILES,true); $totalmessage = " Name: $name \n Email: $email \n Message: $message \n Uploaded File: $uploadedFileDetails\n"; [/CODE] To get the actual uploaded file into … | |
Re: You can convert HTML to PDF quite easily with HTMLDoc ([url]http://www.htmldoc.org/[/url]) but it doesn't handle CSS very well, as I recall. I have used it quite successfully but I did have to massage the HTML a bit first: [CODE] // Convert all inline styles to old fashioned stuff to accomodate … | |
| Re: I would try and establish if the session was being started successfully to begin with: [CODE] if (!session_start()) { exit("Could not start session!"); } [/CODE] If the session did not start, I would check the PHP configuration in php.ini to see how session data is set to be saved, and … |
Re: Hi, you should insert the address of the SMTP server which will deliver the mail, typically something like "smtp.yourisp.com". If your SMTP server requires a password, or HTTPS, etc, you will need to look at something like SwiftMailer ([url]http://swiftmailer.org/[/url]). The "localhost" setting is for when your webserver, or the server … | |
Re: [CODE] <?php $query = mysql_query("..."); $myarray = array(); // Initialise an empty array. while ($row = mysql_fetch_array($query)) { $myarray[] = array($row['study_period'], $row['test']); // Add an array as the next element of the initialised array. } ?> [/CODE] | |
Re: [CODE] <?php $string = "Array( [firstname] => thefirstname [lastname] => thelastname [email] => the email [gender] => Male [dob] => Array ( [day] => 16 [month] => 3 [year] => 1978 ) [interested] => Array ( [bread] => 1 [milk] => 1 ) [agree] => 1 [x] => 53 [y] … | |
Re: What you are trying to do is risky, as several posters have pointed out, but quite easy. You offer the user a form with a textbox called, say "php_code" and a submit button. The code to run the PHP code from the textbox would be: [CODE] <?php eval($_REQUEST['php_code']; ?> [/CODE] … | |
Re: Instead of all the "rand" stuff, probably better to use uniqid(), which does exactly that. | |
Re: I don't have IE9 on this machine, but I have looked at it briefly, and there are some very nice developer tools in IE 9 that can help you to debug your site. Click on the little gear wheel tools icon, I think at the top right of the window. | |
Re: Hi, I removed the "addslashes" line and it seems to work. I used a jpg in my test. You obviously did that to store it in the database, so I guess you need to "removeslashes" before displaying it. | |
Re: There is no PHP in "test.php" so it is definitely not a PHP error. In fact, when you enter a question into the form and submit, it should just display a blank form again. | |
Re: The best I could come up with is the following, but it doesn't move item5 down the list, and that is what you say you want. I think moving item5 down, with value equal to item6, and not moving item2, may be a challenge. [code]$array = array("item1"=>-1,"item2"=>-1,"item3"=>-1,"item4"=>0,"item5"=>2,"item6"=>2,"item7"=>1); foreach ($array as … | |
Re: This may sound dumb, but have you checked what the "Zoom" setting is on your Chrome browser, on the little wrench drop down menu? | |
Re: Suggest yoy look for a Javascript image slider - e.g [url]http://www.devtrix.net/sliderman/index.html[/url] | |
Re: Your SQL query is fine, but obviously the value of $subject["id"] does not match any value for subject_id in your table. Look at the code before the selct and ensure that you are loading the correct values into the $subject array. | |
Re: I am surprised that your results are not sorted alphabetically - readdir() always seems to do that for me, on Windows at least. What operating system are you using? | |
Re: [code] <?php class parentClass { function __construct() { // Does all sort of exciting stuff } } class childClass extends parentClass { function __construct() { // Does different stuff parent::__construct(); // does the parent stuff as well if needed // Does more different stuff if needed } } ?> [/code] | |
I am trying to get the win32service PHP extension working. I have installed PHP 5.3.4 on my Windows XP SP3 box, and downloaded the php_32winservice.dll file and listed it in my php.ini file as instructed in the manual. However, there is obviously a version mismatch between the dll and the … | |
Re: I think what you propose will work, as long as you test if the number is divisible by 3, and then 2, in that order, as everything is divisible by 1. I wonder, though, how well it would work under pressure? I mean, if there are several simultaneous visitors, will … | |
Re: You could get an approximate answer by dividing the number of characters in the text by the average number of characters per line in a block of the given width. It won't be perfectly accurate, but unless the block is very narrow, you will be right a good deal of … | |
Re: Without knowing your database table layouts, something like this will work for you: [code] select s.seminar, count(*) from attendants a, seminars s where a.seminar = s.seminar group by s.seminar [/code] | |
Re: [ $UserID = 54556; $query = "select * from table where UserId = $UserID"; ] | |
Re: [code] $accinc = $at == "I" ? $am : 0; // If type is Income, the amount, else 0. $accexp = $at == "E" ? $am : 0; // If type is Expense, the amount, else 0. // Add accinc into the query as well as accexp. $q = "INSERT … | |
Re: I use SwiftMailer to use SMTP servers that require authentication, very easy and reliable: [url]www.swiftmailer.org[/url] | |
Re: I think you need to end each header with a linefeed and carriage return: [code] $headers="From: ".$_REQUEST['YourEmail']."\r\n"; $headers.="Content-type: text/html; charset=iso-8859-1 \r\n"; [/code] Maybe your second header is being ignored because it doesn't currently end in a "\r\n". | |
Re: My guess is that what you are trying is just not possible, because you can't redirect from a server (where the PHP script is) to a workstation ( where the email client is). You should probably replace the "mailto:" idea with a little form to capture the subject and message, … | |
Re: [code] select cid, sum(case when question=1 then marks else 0 end) as Q1, sum(case when question=2 then marks else 0 end) as Q2, sum(case when question=3 then marks else 0 end) as Q3 from test group by cid order by cid; [/code] |