Reducto Posted May 18, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Share Posted May 18, 2012 Anyone here knows how to put it on a website? I'm not using FluxCP just a simple CSS/PHP Website. Link to comment Share on other sites More sharing options...
Reducto Posted June 26, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Author Share Posted June 26, 2012 BUMP! Link to comment Share on other sites More sharing options...
herenow Posted June 26, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 36 Reputation: 4 Joined: 02/12/12 Last Seen: January 25, 2017 Share Posted June 26, 2012 OnPcLoginEvent: if(getusers(1) > $onlinerecord) { set $onlinerecord,getusers(1); } <?php mysql_connect('ip', 'user', 'password'); mysql_select_db('ragnarok_database'); $res = mysql_query("SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = '$onlinerecord' LIMIT 1"); $res= mysql_fetch_row($res); echo 'Record online:'. $res; ?> The rest is up to you. Link to comment Share on other sites More sharing options...
Reducto Posted June 26, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Author Share Posted June 26, 2012 Thanks a lot. All I need is to create a table right? Link to comment Share on other sites More sharing options...
herenow Posted June 26, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 36 Reputation: 4 Joined: 02/12/12 Last Seen: January 25, 2017 Share Posted June 26, 2012 All you need is to echo the $res in the website, and configure the : mysql_connect('ip', 'user', 'password'); mysql_select_db('ragnarok_database'); AND put that npc script in the server. Link to comment Share on other sites More sharing options...
Reducto Posted June 26, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Author Share Posted June 26, 2012 I'm having errors. Can you help me? Notice: Undefined variable: onlinerecord in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 4 Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5 Record online: Link to comment Share on other sites More sharing options...
herenow Posted June 26, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 36 Reputation: 4 Joined: 02/12/12 Last Seen: January 25, 2017 Share Posted June 26, 2012 (edited) Ops.. Try this code. <?php mysql_connect('ip', 'user', 'password'); mysql_select_db('ragnarok_database'); $res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = \'$onlinerecord\' LIMIT 1'); $res = mysql_fetch_row($res); echo 'Record online:'. $res; ?> Edited June 26, 2012 by Tribbiani Link to comment Share on other sites More sharing options...
Reducto Posted June 27, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Author Share Posted June 27, 2012 One more error... Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5 Record online: Link to comment Share on other sites More sharing options...
herenow Posted June 27, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 36 Reputation: 4 Joined: 02/12/12 Last Seen: January 25, 2017 Share Posted June 27, 2012 (edited) One more error... Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5 Record online: kinda rusty here.. anyways.. use this... it was varname not str ><. <?php mysql_connect('ip', 'user', 'password'); mysql_select_db('ragnarok_database'); $res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `varname` = \'$RecordOnline\' LIMIT 1'); $res = mysql_fetch_row($res); echo 'Record online:'. $res[0]; ?> Edited June 27, 2012 by Tribbiani Link to comment Share on other sites More sharing options...
Reducto Posted June 28, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Author Share Posted June 28, 2012 Thank you very much! It's working now! Link to comment Share on other sites More sharing options...
Question
Reducto
Anyone here knows how to put it on a website? I'm not using FluxCP just a simple CSS/PHP Website.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts