NightWheeler Posted May 27, 2014 Share Posted May 27, 2014 hello, This is a long and might be a broad question, but I am really stuck. I am new to web development, doing it for a couple weeks now maybe. But I am pretty familiar with C#. I'm making a gambling site for TF2 Items (P.S. - TF2 = Team Fortress 2, it is a virtual game with an economy). Using C# coded bots, I am giving users 'credits' according to the items of TF2 they deposit. The site is similar to any bitcoin dice gambling site, for example http://www.primedice.com or http://www.just-dice.com Now, I am stuck in 2 things. I wanna make a good form like primedice which I am unable to do (I am using Bootstrap and jQuery). Also, I want that when user places a bet, just like primedice, a new row gets added to a table on the "All Bets" page. I don't want people to refresh to see it, it should update in real time. I can provide you with some code of mine so you can structure it in there, just let me know if you want it. Thanks and please! Quote Link to comment https://forums.phpfreaks.com/topic/288799-please-help-me-in-this/ Share on other sites More sharing options...
Psycho Posted May 27, 2014 Share Posted May 27, 2014 I have one bit of advice for you. When implementing a feature do NOT start by trying to do it with AJAX. Just use a normal form that you POST and refresh the page. Yes, I know that isn't what you want. But, doing something as simple as receiving a form post and making changes in the database aren't going to be perfect right out of the gate and will likely require some debugging. It is more difficult to debug code when there are multiple technologies involved (PHP, JavaScript, MySQL, etc,). So, make the page work with vanilla HTML and PHP. Once it is working, THEN implement AJAX so the user doesn't have to manually submit the page and refresh. Quote Link to comment https://forums.phpfreaks.com/topic/288799-please-help-me-in-this/#findComment-1480987 Share on other sites More sharing options...
NightWheeler Posted May 27, 2014 Author Share Posted May 27, 2014 I have one bit of advice for you. When implementing a feature do NOT start by trying to do it with AJAX. Just use a normal form that you POST and refresh the page. Yes, I know that isn't what you want. But, doing something as simple as receiving a form post and making changes in the database aren't going to be perfect right out of the gate and will likely require some debugging. It is more difficult to debug code when there are multiple technologies involved (PHP, JavaScript, MySQL, etc,). So, make the page work with vanilla HTML and PHP. Once it is working, THEN implement AJAX so the user doesn't have to manually submit the page and refresh. Alright. THe normal POST page, I got it working. Quote Link to comment https://forums.phpfreaks.com/topic/288799-please-help-me-in-this/#findComment-1480988 Share on other sites More sharing options...
boompa Posted May 27, 2014 Share Posted May 27, 2014 Try reading this to get an understanding of what you need to do: http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery Quote Link to comment https://forums.phpfreaks.com/topic/288799-please-help-me-in-this/#findComment-1481014 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.