Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by AbraCadaver

  1. Stop using mysql_ functions use mysqli_ or PDO. Use mysqli_error().
  2. And for me, to answer all questions present and future, I am not a developer and never have been, so the projects that I've done have been outside of my normal job (network design, security, consulting, etc). I charge a lot for the dev projects that I do do, and estimate high because I don't need the work, but do need flexibility. So maybe I'm not the best to answer for those starting out as I tend to think of average rates for someone who would ask "what do I charge". I was kind of thinking that $40/hour was the average for average (American) developers and average projects (small HTML/CSS, no JS, PHP, no from scratch graphics, etc). I would think that normally, experienced PHP devs that do dynamic DB driven sites wouldn't even go after this type of project unless they had extra time or business was really slow. Years ago (10 or 12) I worked for a company that provided high-speed Internet to office buildings and as a service they resold web development packages from some other small company. If I remember correctly the smallest site price was $500 (just HTML, maybe 5 or 10 pages).
  3. For me 10 hours is adequate and the $40 was in general, I charge more As I said, I would get buy-in from the client on the general layout, color scheme etc and agree to deliver what was stated (spelled out in contract) with some verbiage around minor changes/tweaking after the fact. I haven't done these small sites in a very long time but I agree with KevinM1. I would set a base price for any site, no matter how small and build from there.
  4. I would start with a reasonable hourly rate, maybe $40/hour and decide how long it would take you to do maybe one page and multiply. I would say maybe $400, but you should get buy-off from the customer on a draft layout of one page (layout, colors, etc.) before doing the rest.
  5. I think they are talking about removing blank entries from an HTML dropdown. That JS is doing something to set the entries to '' so they appear as blank in the dropdown. Is this correct? Not tested: echo "\t\t\tdocument.pickDivision.cloth.remove(index);\n";
  6. You're vars are coming from $_GET or $_POST? If so then magic_quotes_gpc is enabled and adds slashes before populating the get or post vars. Normally you'd disable magic_quotes_gpc and not rely on them, but if they happen to be enabled then you could do this in a main included file that is executed before any code that uses get or post vars: if(get_magic_quotes_gpc()) { $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); } Similarly there is magic_quotes_runtime.
  7. Well it depends. If you are storing prices then you could pick the DECIMAL column type to store 15000.99 for example because the decimal is part of the data (it separates the whole number from the fractional) and can't really be calculated from a string of numbers like 1500099. The comma as a thousands separator is only format and can be added when displayed because you can consistently determine where to place the commas.
  8. I meant you need to change the data in the database, not your query. 1. What is the column type of Retail_price? 2. Why is there a comma? Is it a thousands separator or a decimal?
  9. If the 15,000 is supposed to be fifteen thousand then do not store it withe the comma. Just put data in the database, no formatting.
  10. The problem is here: $url = "https://inputs.io/api?action=send&key=$apiKey&pin=$apiPin&note=" . urlencode($cashoutMessage . " | MyFaucet Powered") . "&address=" . urlencode($email) . "&amount=" . ($balance / 100000000); Replace $balance with $row['balance']
  11. Well damn, I've been chasing the wrong thing. What is: var_dump($balance);
  12. They are appalled and disgusted
  13. Because you don't have PHP 5.4? I guess we assumed it worked with fetch_row() and for some reason you changed it to fetch_assoc(). Would've been helpful to know that the original code didn't work either Try: $row = $balanceQ->fetch_row(); if($row[0] >= 0){ or: $row = $balanceQ->fetch_assoc(); if($row['balance'] >= 0){
  14. After successful login set a session var, maybe their username or just loggedin = true or something. Then on each "protected" page check for that session var. Give it a try and post some code. Do you have the login coded already?
  15. $balanceQ->fetch_assoc() returns an associative array or null which will always be > or = 0. Maybe: if($balanceQ->fetch_assoc()['balance'] >= 0){
  16. Sorry, I wasn't paying attention that this was a mysql forum and not PHP. I was asking to show how you were passing it.
  17. No it is looking for a match of z repeated 1 time and it found 1 z. Roughly the same as [z] (match a z character) If you want to find a z not followed by a z then something like [z][^z]. For your pattern, if you did a preg_match_all() you'd get 3 matches for 3 single z.
  18. Sessions or if they are simple vars that don't need to be hidden you can put them as get params in the redirect URL: header("Location: www.example.com/page.php?var=$var1&var2=$var2'); Then get them on the next page: echo $_GET['var1']; But I would probably use sessions, and it will be handy to learn them.
  19. You don't actually break out of the single quotes in the PHP string to have $image concatenated. Also you probably need to add images/ to the location: echo '<div class="img"><a href="#" onClick="window.open(\'images/'.$image.'\', \'width=600\', \'height=400\', \'scrollbars=no\', \'menubar=no\');"><img width="160" height="140" src="'.$image.'"></a></div>';
  20. www.example.com is not a URL, it's a fully qualified domain name. A URL contains the protocol as well. Why not check and if not, add a default one? Something like: if(strpos($url, "://") === false) { $url = "http://$url"; } Or use a preg_match() to be stricter. Then use filter_var($url, FILTER_VALIDATE_URL). Or maybe: if(!parse_url($url, PHP_URL_SCHEME)) {}
  21. You're missing a quote before $news_title in the query.
  • 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.