Jump to content

jdock1

Members
  • Posts

    210
  • Joined

  • Last visited

    Never

Everything posted by jdock1

  1. This is the #1 most important thing about an app Im developing on the side. There can be only one account per household. If I made it so anybody can just reg another account after they run out of points, this app would not work and not last long. Whats the easiest way to go about doing this? Is there a class out there already written for this type of thing? I know its impossible to completely stop someone from doing this. But I would like to disallow proxy users. Maybe by setting a cookie and inserting the IP into a database and matching it with new regs. Anybody already have some code for this? Or what do you suggest to do? Thank you!!
  2. Great advice people. Your both right, its not shit until its live. Atleast to presentate it to potential investors. I may take that route. Where can you find investors? Your right about the copycat thing to. Im just gona say f*ck it. It would be hard for someone to rip the whole app within a few days anyway. Im just going to make it live and see how many signups I can get for now, then maybe look into advertising it through a CPA network and pay per signup. Thanks for the advice guys.
  3. I have developed a pretty cool application over the past year and a half written in php and driven by mysql. Its a highly database driven website and is definitely new to the internet. There is no website like it, and its a great idea for a website that can definitely deliver high revenue. It could also be integrated as a facebook app & I could really see it taking off. With the project nearing its completion, I feel stuck, I dont know what I want to do. Idk if I want to start it up myself and possibly build a business off of it, or sell the application & idea to someone else who has the time & money to put into it. Thats my problem, to start up a site and be serious about it you need money to put into it, I really dont have spare money laying around I can invest, nor do I have the time. My questioin here is , is there anything out there that will review your "website" or application and appraise it? kind of dumb, but I guess thats what im looking for right now. Im scared, however, that if I let it out there someone will rip my app & idea. Its definitely, to me atleast, very valuable and unsaturated. I have never mentioned it elsewhere, not even on this site, thats how careful I am about this. I put alot of time and money into this and hired alot of other people to help me develop it. Anybody know where I could/should go from here? Thank you
  4. Thanks, but that shit sucks. I cant get it to work on my server Anybody else got a solution? A simple one with a few lines of code. That script is alot of code for a relatively simple thing
  5. Wow, thanks... thats so much neater and sensible code. I am a complete idiot. Idk why, but I just have trouble understanding things. I was never good at math, I never made it past pre-algebra in school, had f's till I dropped out when I was 16. But I love coding, it just takes me longer to understand things than others. Thanks for the help, it works perfectly.Ive been trying to achieve this for a month.
  6. I looked into this everywhere,but the code does not make sense, is not properly documented and is outdated. Ive been trying to achieve this for the past hour. Anybody know how I can do this?
  7. Ok heres my code, I know its messy, but thats just how I code, its the only way I know; <?php $query="SELECT * FROM messages ORDER BY date DESC"; $fetchquery="SELECT * FROM messages"; $result=mysql_query($query,$link2); $fetchresult=mysql_query($fetchquery,$link2); $fetchdata = mysql_fetch_array($fetchresult); $email=$fetchdata['email']; while ($row = mysql_fetch_array($result)){ $delquery="DELETE FROM `messages` WHERE `id` = '".$row['id']."' LIMIT 1"; echo '<fieldset><legend><div class="mhead">Message from <em>'.$row['from'].'</em> on <em>'.$row['date'].'</em></div></legend><br> <div class="mbody">'.$row['input'].' </div><br> <div class="mreply"><u>Reply</div></u><br> <form action="" method="post"> <textarea name="msg" cols="30" rows="15" style="background-color:#6D6968" /></textarea><br> <input type="submit" name="submit" value="Send" /> </form> <br> <br> <form action="" method="post"><input type="submit" name="delete" value="Delete message" /></form> </fieldset>'; if (@$_POST['delete'] == "Delete message") { mysql_query($delquery,$link2); echo "<font color='#00FF00'>Message deleted from database</font>"; } $msg = @$_POST['msg']; $to = $email; $subject = 'Reply from numbergame.com'; $message2 = ' '.$msg.' '; $headers = 'From:admin@numbergame.com' . "\r\n"; if (@$_POST['submit'] == "Send") { mail($to, $subject, $message2, $headers); } echo "<img src='imgs/hr.png' alt='HR' />"; } ?> I am using a lopp to display all of the results in the table. And im using $row variable, so I can pull the id number from the database and match it so it will delete only that result. Thanks for all the help guys.. I may just be an idiot. This is the only way I could think of it to work. So do Igot it all wrong?
  8. No, that worked great, thank you! I cant believe I didin't think of that. It did have a purpose, I was getting the users email from the table so it could be entered into a mail field. But, I just switched around the variable names, now it works fine. Thanks alot though, now I can move onto the next step! Ok, now im facing a problem with trying to delete a single result on the page. Im using the query $delquery="DELETE FROM `messages` WHERE `id` = '".$row['id']."' LIMIT 1"; I included a button on every result being echod, when clicked it executes that query. When I click it, it deletes every result on the page. That was my problem before. Since im echoing every result in the table, its deleting every result because $row['id'] is defined as the ID number in every result, therefore deleting them all, not just the one. I think this is impossible!
  9. I dont get it at all. Everything works fine, other than it not listing all results. When I change the query back to the originial with no order, every result is echoed. But when its ordered, it leaves the most recent result out.
  10. Long day of coding, idk. I got it, thanks. I got a really crappy problem now, which makes no sense to me. Im ordering the results by the date field descending as you stated, it is working, but it does not list the most recent result. When I enter another message into the database, it pushes the one before it to the top and echos it, but does not echo the most recent. I have no idea how to fix this? Here is my code $query="SELECT * FROM messages ORDER BY date DESC"; $result=mysql_query($query,$link2); $fetchdata = mysql_fetch_array($result); $email=$fetchdata['email']; while ($row = mysql_fetch_array($result)){ echo '<fieldset><legend><div class="mhead">Message from <em>'.$row['from'].'</em> on <em>'.$row['date'].'</em></div></legend><br> <div class="mbody">'.$row['input'].' </div><br> <div class="mreply"><u>Reply</div></u><br> <form action="" method="post"> <textarea name="msg" cols="30" rows="15" style="background-color:#6D6968" /></textarea><br> <input type="submit" name="submit" value="Send" /> </form> </fieldset>'; $msg = @$_POST['msg']; $to = $email; $subject = 'Reply from test'; $message2 = ' '.$msg.' '; $headers = 'From:test@localhost' . "\r\n"; if (@$_POST['submit'] == "Send") { mail($to, $subject, $message2, $headers); } I
  11. For the second part, deleting the entry, what do I put in the [integer]? I just dont see how this will work, im testing it now, will post results
  12. Also, how could I even delete single results? Ive tried multiple things, ive tried using an ID or deleting by matching the name of one of the table fields, but it deletes all results. Its near impossible to delete from a database without doing it in the mysql console or phpmyadmin itself! Im more worried about ordering, however. I will look into this more
  13. What im trying to achieve is a user contact system, when the user types input in the textarea its saved in a database along with his userid on the site and the date, I have an admin side coded up where it retrieves the data, but there is no order. I want to have it display the most recent results on top. I have looked into this in the mysql manual, but you know how that is its so hard to make sense of anything in that damn manual. Im using a while loop to display the data. How can I achieve this?
  14. Ha thanks good idea, pretty basic, its just there are so many way to do things in php its hard to come up with one, but if I would have thinked about it I would probably have done that lol thanks. Anybody else got a suggestion? Maybe a more secure way? A smart user could probably get around that.
  15. I'm using paypal PDT, so when the user has made payment he gets directed back to my site, on that page it executes a special sql query. I noticed I can refresh the page to make duplicate sql queries. How can I avoid this??
  16. Thanks for the idea. Yeah, that seems like itd be easier. And yes, I know, I have the shittiest code. I can code, but its very messy!
  17. I am using an if statement. If the user has a credit value of 1 or more it echos a variable thats a form. When the user submits the form, it takes a credit away, so the credit value is -1. I need the form to dissapear, because the form has a button that will execute a query that I dont want to execute. So, usually unset() fixes this, but its not in my case. Heres the code $a='<strong></strong>'; if ($hintcredit<1) $a.='<font style="color: #cc0000;">You have already requested a hint! Once you guess the correct number, you will be able to get another hint. </font>'; else $form= "<form action='blablabla' method='post'>blablablabla</form>"; $a.=$form; $a.='<strong></strong>'; echo $a; if ($_POST['request'] == "Retrieve Hint") { unset($form); $form= '<b>One of the digits in your number is '.substr($num, -1).'</b>'; $newquery= "UPDATE userinfo SET hint_credits = '-1' WHERE username = '".$_SESSION['login_name']."'"; echo $form; mysql_query($newquery,$link); } In this case, the form is still being shown. I need the form completely removed after the form has been submitted. This is simple and idk why its not working for me!?
  18. Dude thanks! I appreciate your reply thats perfect.
  19. I know paypal has some sort of php api, but I know nothing about it and where to find it. I want to create an app that will instantly pay users from my account after a certain action is deployed on my site. I know this is possible, a few years ago I was going to hire a programmer to do it, but he wanted to much... But how would I go about doing this? Idk where to begin. It seems like it would be pretty simple, but since Id be wokring with third party code, or even paypal in general I can see it being a little more difficult. Im sure itd be working with cURL?
  20. Oh thats not an issue, its good actually if you want only the digits to be displayed with no obscured chars (in case the end user cant know how long the string is). But thats cool thats how I learned so far, thats what It seem every good coder says, they taught themselves online. I just need to start looking harder online for more tutorials. Thanks for all your help.
  21. Oh sweet thanks bro! Sorry I havent got back to this post in a while I havent been able to get on a computer. Ima check it out ill post back when I get the results
  22. Good idea. Im saving this and putting it on my hard drive. This will come in handy in the future as well. I noticed when you set the $obscure_char to blank it displays nothing but the string letters/digits, leaving the obscured characters out without being replaced by a char such as "*". Im not sure if this is self explanatory or not, but I think it would be something worth referencing in the class. I need to ask, how did you learn PHP? How did you get to the level of expertise your on? I ask every good coder this that has helped me out. I love coding it is my 100% most favorite thing to do, & I really want to master it. I would like to make a career out of it. I already have made alot of money by releasing simple/cool little apps & creating/editing code for people,and cant imagine what else I could do with more knowledge. I think im stuck where im at, sometimes I look at peoples code and wonder how they can write so fluently.
  23. Omg you got it! Thanks bro. I really appreciate it! Finally we got to the bottom of this now I can move on to the next step of my application! The only thing with this, is its displaying more chars than the actual string. Im using a 3 digit number in a database, & its displaying sometimes 4 total chars. I set the $num_to_obscure to 2. For this instance I want to display one digit. When I refresh the page its random, which is great, but its displaying sometimes 2 digits, or sometimes one digit with two "*" characters. But, Im defintly not bitching! This is great, thank you so much for your help and your code!!!!!!
  24. Im about to post it on freelancer.com. Thats all I can think to do! I could possibly do this thhrough mysqls substring, but I read the manual and its just too confusing and doesnt explain it all too well
  25. Ok,well after playing around with it a little, I deleted everything that had to do with the percentage, just was confusing for me so I figured Id try that. Lol, well, its returning digits, but its still off. I changed the $amt to 1, the string i was using was 492. It was random, everytime I reloaded it would be different, with one character being displayed and three obscured chars, or with 2 chars being displayed with one or two obscured chars. Very interesting... pretty stuck now though. I tried obscuring a mysql value, and nothing was even displayed. I think its impossible I cant believe it!!
×
×
  • 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.