Jump to content

NightWheeler

New Members
  • Posts

    3
  • Joined

  • Last visited

NightWheeler's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, Here is my current code: index.php <html> <body> <form id="hey" name="hey" method="post" onsubmit="return false"> Name:<input type="text" name="name"> <input type="submit" name="submit" value="click"> </form> <table class="table table-bordered" id="update"> <thead> <th>Name</th> </thead> <tbody> <script type="text/javascript"> $("#hey").submit(function() { $.ajax({ type: 'GET', url: 'response.php', data: { username: $('#name').val()}, success: function (data) { $("#update").prepend(data); }, error: function (xhr, ajaxOptions, thrownError) { alert(thrownError); } }); }); </script> </tbody> </table> response.php <?php $username = $_GET['username']; echo "<tr>"; echo "<td>$username</td>"; echo "</tr>"; ?> This code works fine, it prints out the rows as what the user enters. Now what I want to do is, log all these entries to a mySQL database and also, display these rows over the site. i.e., any user who is online, should be seeing this without having to refresh the page too.. Real time updates in a way. How can I achieve that? Thanks!
  2. Alright. THe normal POST page, I got it working.
  3. 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!
×
×
  • 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.