- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 23
- Posts with Upvotes
- 20
- Upvoting Members
- 17
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Re: In line 91 you're trying to construct the member Patient which is a type not a member. You did it right everywhere else though. This, however, is not the only thing wrong with the 'Patient' construction in Billing. You're constructing a Patient from a Person but you haven't specified a … | |
Re: This suggests there is an error in your SQL-query on line 5. Replace line 5 with: [code] $mark = mysql_query("select * from product order by product_id DESC") or die(mysql_error());[/code] and see what you get. | |
Re: [b]mysql_query[/b] returns a boolean false when the query fails so if you fix the query (to which the second error applies) the first will disappear also. As for the second error: it's probably something to do with [b]$UserID[/b] as the rest looks alright. Maybe you could show us what the … | |
Re: In the first file $cid is never defined. I think you mean $_POST['cid'] instead of just $cid? | |
Re: This is just a suggestion but maybe it'll be the key to you figuring it out. Keep an 'items' table containing all the items in your game with a structure like: id, type, upgrades, owner Then you could just fetch all items with a certain type and a certain owner … | |
Re: You forgot a " on line 10 [code]$id1 = implode("-", $id);[/code] and $id isn't an array but a single value so you can't implode that (implode takes an array). | |
Re: Your [b]openWithCURL[/b] function doesn't return anything. I suppose you want [code]function openWithCURL($url){ $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL, $url); $result = curl_exec($curl_handle); curl_close($curl_handle); return $result; }[/code] | |
Re: Well this functions.php file prints a new line at lines 7 to 9 [code]?> <?php[/code] And you probably know that printing requires the headers to be sent so you can't change them anymore after printing. Try removing these 3 lines. | |
Re: Are you sure it failed? When you're using [b]exec[/b] like in your post, it won't output anything but only return the last line of the result of the given command. If you want all the output supply an array as second argument to [b]exec[/b]. This array will then be filled … | |
Re: How about this [code]$text = preg_replace('/(https{0,1}:\/\/([\w\-\.\/#?&=]*))/', '<span class="tweet_links_intext"><a href="$1" target="_blank">$2</a></span>', $text);[/code] | |
Re: In comes the bragging. You reached 499 points, so you achieved position 324 of 111445 on the ranking list You type 622 characters per minute You have 121 correct words and you have 0 wrong words | |
Re: How about this. [code]$string_exp = "/^[A-Za-z\x80-\x95 .'-]+$/";[/code] | |
| Re: At line 7 you specify the variable [b]$path1[/b] but in the copy function on line 11 you use [b]$path[/b] which is undefined. This produces the error. |
Re: Use [b]exec[/b] instead of [b]system[/b] and specify an empty array as the 2nd variable. This will then be filled with all the lines output by the command. [url]http://www.php.net/manual/en/function.exec.php[/url] [code]$result = array(); exec('/usr/bin/whois 4.2.2.2', $result);[/code] Now you have an array filled with all the lines, excluding trailing whitespace, of the output. … | |
Re: Maybe you would also like to post your operator>> because I'm not able to solve it like this. Perhaps someone with actual coding skills might be able to, though, but to me it seems unlikely. | |
Re: By default PCRE regex patterns in PHP don't match newlines with . and maybe POSIX patterns do, I'm not sure. But since you probably have newlines in your template file, I think changing the pattern to the following should solve your issues: [code]$header = preg_replace("/".$bodytag."(.*)/is", '', $temp); $footer = preg_replace("/(.*)".$bodytag."/is", … | |
Re: It's definitely possible with the GD library but from reading your question I feel like your expectations of the capabilities of the GD library are too big. The GD library exists only for basic drawing functions, it will not check for you whether two lines are intersecting for instance. I … | |
Re: Just add [code]$rows[$k] = array();[/code] in between lines 7 and 8. | |
Re: It would help if you'd also post the error but a first suggestion would be to use [b]<?php[/b] as starting tag instead of your [b]<?[/b] on line 1. | |
Re: A for loop is set up as follows: [code]for ( inital step; condition to continue; step to execute after every loop )[/code] So your second for loop, the one supposed to decrease, has the first two arguments mixed up. This turns it into an infinite loop because [b]$row2[0] = 15[/b] … | |
Re: The closing double-quote for your MySQL query on line 39 is actually the wrong character. It should be a [b]"[/b] and you have a [b]”[/b], so the string is never closed and eats the rest of your code. | |
Re: [code]vector<string> data; vector<string>::iterator found = find(data.begin(), data.end(), "search"); int pos = found - data.begin();[/code] | |
Re: Change [code]$result = mysql_query("SELECT userid FROM user ORDER BY userid DESC LIMIT 0,1");[/code] to [code]$result = mysql_query("SELECT userid FROM user ORDER BY userid DESC LIMIT 0,1") or die(mysql_error());[/code] and you should see an SQL error. If you can't solve the error, just post it back here. | |
Re: This happens because you can't access an array's members directly inside a double-quoted string. You can either try like this [code]study_period='{$period[$i]}'[/code] that [i]might[/i] work, I'm not sure. Or just do it like this [code]study_period='".$period[$i]."'"[/code] which will work for sure. | |
Re: This error occurs because you are including a certain file multiple times and therefore trying to redefine the Figure class. I've always been taught to wrap my class header files in the following format to prevent multiple definitions: [code]#ifndef __IN_HEADERNAME #define __IN_HEADERNAME // // The original header goes here // … | |
Re: Also, may I ask why you want to do this in the first place? If it's for measuring the time the users takes to produce some input it's much easier to check the time before you ask for input, check it again right after input has been received and simply … | |
Re: [url]http://nl.php.net/manual/en/function.error-reporting.php[/url] [code]error_reporting(E_ALL ^ E_NOTICE);[/code] | |
Re: In the first file you set two variables with the username and password for MySQL. When connecting however you don't use these variables but two constants. Also, or die(mysql_error()) can be appended to any MySQL function, including mysql_connect. If you would've done that, mysql_connect would throw the first error instead … | |
Re: In [b]connection.php[/b] you are connecting with MySQL functions but in [b]Prepared_Statements.php[/b] you are trying to execute queries with the MySQLi functions. | |
Re: Because 150.000 x 150.000 floats equals ~21GB of memory. I don't think you have that much RAM in your computer. |