Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
83% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
~16.8K People Reached

41 Posted Topics

Member Avatar for Michael_93

Hi Michael, Why haven't you considered one of the many e-commerce packages which are available, e.g. WordPress and WooCommerce, Magento, etc?

Member Avatar for NettSite
1
2K
Member Avatar for NettSite

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 …

Member Avatar for gon1387
0
4K
Member Avatar for NettSite

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 …

Member Avatar for NettSite
0
216
Member Avatar for cbwhellmouth

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 …

Member Avatar for pritaeas
0
336
Member Avatar for calebcook

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 …

Member Avatar for tiggsy
0
1K
Member Avatar for stephen_UK

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 …

Member Avatar for Rhamises
0
143
Member Avatar for AngelicOne

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 …

Member Avatar for NettSite
0
138
Member Avatar for atfOnly

[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]

Member Avatar for atfOnly
0
272
Member Avatar for whiteyoh

[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] …

Member Avatar for NettSite
0
117
Member Avatar for IIM

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] …

Member Avatar for IIM
0
241
Member Avatar for ebanbury

Instead of all the "rand" stuff, probably better to use uniqid(), which does exactly that.

Member Avatar for ebanbury
0
216
Member Avatar for programmer12

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.

Member Avatar for programmer12
0
137
Member Avatar for garromark

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.

Member Avatar for maxterner
0
308
Member Avatar for rrlogu

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.

Member Avatar for rrlogu
0
278
Member Avatar for andrewschools

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 …

Member Avatar for redfox23
0
2K
Member Avatar for Tracie-marie

This may sound dumb, but have you checked what the "Zoom" setting is on your Chrome browser, on the little wrench drop down menu?

Member Avatar for teedoff
0
151
Member Avatar for saadi06

Suggest yoy look for a Javascript image slider - e.g [url]http://www.devtrix.net/sliderman/index.html[/url]

Member Avatar for NettSite
0
86
Member Avatar for shoykay

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.

Member Avatar for Mckcvision
0
216
Member Avatar for bobgodwin

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?

Member Avatar for bobgodwin
0
568
Member Avatar for hmhb.in

[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]

Member Avatar for NettSite
0
85
Member Avatar for NettSite

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 …

Member Avatar for NettSite
0
167
Member Avatar for david cashin

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 …

Member Avatar for diafol
0
124
Member Avatar for arthurav

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 …

Member Avatar for diafol
0
129
Member Avatar for ddellostritto

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]

Member Avatar for ddellostritto
0
62
Member Avatar for balle

[ $UserID = 54556; $query = "select * from table where UserId = $UserID"; ]

Member Avatar for johnmaguire2013
0
143
Member Avatar for london77

[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 …

Member Avatar for NettSite
0
1K
Member Avatar for Dragonbaki

I use SwiftMailer to use SMTP servers that require authentication, very easy and reliable: [url]www.swiftmailer.org[/url]

Member Avatar for Dragonbaki
0
86
Member Avatar for MysticalNomad

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".

Member Avatar for MysticalNomad
0
186
Member Avatar for Geertc

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, …

Member Avatar for Geertc
0
158
Member Avatar for mtvaran

[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]

Member Avatar for NettSite
0
93
Member Avatar for benhowdle89

First check the content of $_POST['data']: [code]echo nl2br(var_export($_POST['data'],true));[/code] at the start of your PHP script will do the trick - or if it doesn't display due to AJAX stuff, wrtie it to a file instead of echo. I would have handled the PHP slightly differently, not to solve your current …

Member Avatar for NettSite
0
132
Member Avatar for wangome

The error is "Warning: Cannot modify header information - headers already sent by (output started at /home/meliapro/public_html/feedback.php:9) in /home/meliapro/public_html/feedback.php on line 144" You are obviously doing something on line 144 of feedback.php which involves setting headers, but you have already sent something to the browser in line 9. It may …

Member Avatar for monica singh
0
135
Member Avatar for nsam

In the row [code]echo "<td><a href=farmmgmt.php?y={$row['docid']}>Assign</a></td>";[/code] you need to add the cowid, or you won;t know which cow to assign the doctor to. [code]echo "<td><a href=farmmgmt.php?y={$row['docid']}&amp;cowid={$latest}>Assign</a></td>";[/code]

Member Avatar for diafol
0
145
Member Avatar for whiteyoh

I do similar things using SwiftMailer (swiftmailer.org) and it works very well, and is very easy to do.

Member Avatar for NettSite
0
62
Member Avatar for khushhappy

In your select, you forgot to enter the value for Sno, should be: [code]$query = "select * from table where Sno = {$_GET['Sno']}";[/code] I prefer $_REQUEST to $_GET, btw - it will work with both get and post variables.

Member Avatar for khushhappy
0
283
Member Avatar for CFROG

If you are really attached to the idea of serialising the data instead of having distinct columns that you could query, you will need to use the "like" comparison, e.g. select * where serialstring like '%"friends";s:1:"1"%' will return all records with friends checked. Much better, though, to use either distinct …

Member Avatar for CFROG
0
93
Member Avatar for dan_ord
Member Avatar for Davife

Hi David, I use the following function to hide errors from users, write them to a log file and send me an email. You would need to replace the log writing, alerting and emailing functions withn your own. [code=php] <?php function error_handler($errno,$error,$file,$line) { $msg = "<h2>PHP Runtime Error:</h2>"; $msg .= …

Member Avatar for NettSite
0
110
Member Avatar for moobaa
Member Avatar for jeeter19

This works for me: [code=php] <?php if (!isset($_COOKIE['auth'])) setcookie("auth","this is the value"); else echo getCookieValue("auth"); function getCookieValue($cookie) { return $_COOKIE[$cookie]; } ?> [/code]

Member Avatar for Airshow
0
133
Member Avatar for dylank

Doesn't look much like AJAX at all, just a normal PHP/HTML page. Using AJAX, the form would trigger a Javascript function instead of reloading the whole page. The Javascript would connect to the server and execuite a script to establish if the login details are correct, and according to the …

Member Avatar for NettSite
0
159

The End.