[Help] UberCMS Bots Page

JayC

Always Learning
Aug 8, 2013
5,493
1,398
I am sure one of you Expert Coders here on devbest can figure out what is wrong with this
This is a screenshot of wth its doing:
qdMJYsj.png

It's suppose to give a list of MY rooms NOT the welcome rooms! Thanks
Code:
<div class="habblet-container ">      
<div class="cbb clearfix pixellightblue ">
<h2 class="title">Bot Shop</h2>
<div class="box-content">
<div style="text-align: left;">
<div style="padding:5px">
    <form name="form" action="/bots/insert.php" onsubmit="return validateForm();" method="post">
        <span title="Don&#39;t worry about the ID, it has been corrected for you.">Bot ID: </span><br />
        <input type="text" name="id" value="<?php
        $sql = "SELECT * FROM bots ORDER BY id DESC LIMIT 0,1";
        $result = mysql_query($sql);
        $info = mysql_fetch_array($result);
        $id = $info['id'];
        $addition = $id + 1;
                        
        echo $addition;
        ?>" readonly /><br /><br />
                  
        <span title="Pick your room">Room ID: </span><br />
        <select name="room_id">
        <?php
        $getIDs = mysql_query('SELECT *, caption FROM rooms WHERE owner = "'.$_SESSION['user']['username'].'"');
      
        while($row = mysql_fetch_array($getIDs)){
            echo "<option>";
            echo $row['caption'];
            echo "<br /></option>";
        }
        ?>
        </select><br /><br />
      
        <span title="Name">Bot name: </span><br />
        <input type="text" name="name" /><br /><br />
      
        <span title="Motto">Bot motto: </span><br />
        <input type="text" name="motto" /><br /><br />
                  
        <span title="Look">Look: </span><br />
        <input type="text" name="look"  value="hd-180-7.sh-290-110.lg-270-91.ch-809-62.hr-828-45" /><br /><br />

        <span title="Position">Coordinates: </span><br />
        X: <input type="number" name="x" /><br /><br />
        Y: <input type="number" name="y" /><br /><br />
        Z: <input type="number" name="z" /><br /><br />
        Rotation: <input type="number" name="rotation" /><br /><br />
                  
        <span title="Mode">Walk mode: </span><br />
        <select name="walk_mode">
            <option>stand</option>
            <option>freeroam</option>
            <option>specified_range</option>
        </select><br /><br />
                  
        <input type="submit" value="Next Step &raquo" class="submit">
    </form>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
</div>
</div></div>
</div>
@Nehalem you helped me with my last code issue and Jerry you are pretty smart @JerryCool
 

Jerry

not rly active lol
Jul 8, 2013
1,956
522
Use this;
Code:
<span title="Self-explanatory.">Room ID: </span><br />
                                                        <select name="room_id">
                                                        <?php
                                                        $getRoomInfo = mysql_query('SELECT id,caption FROM rooms WHERE id AND owner = "'.USER_NAME.'"');
                                                       
                                                        while($roomInfo = mysql_fetch_array($getRoomInfo)){
                                                            echo '<option value="';
                                                            echo $roomInfo['id'];
                                                            echo '">';
                                                            echo $roomInfo['id'];
                                                            echo ' - ';
                                                            echo $roomInfo['caption'];
                                                            echo '<br /></option>';
                                                        }
                                                        ?>
                                                        </select><br /><br />
It should show like this;
yHCmppS.png
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Use this;
Code:
<span title="Self-explanatory.">Room ID: </span><br />
                                                        <select name="room_id">
                                                        <?php
                                                        $getRoomInfo = mysql_query('SELECT id,caption FROM rooms WHERE id AND owner = "'.USER_NAME.'"');
                                                      
                                                        while($roomInfo = mysql_fetch_array($getRoomInfo)){
                                                            echo '<option value="';
                                                            echo $roomInfo['id'];
                                                            echo '">';
                                                            echo $roomInfo['id'];
                                                            echo ' - ';
                                                            echo $roomInfo['caption'];
                                                            echo '<br /></option>';
                                                        }
                                                        ?>
                                                        </select><br /><br />
It should show like this;
yHCmppS.png
Perfect it worked! Thanks Jerry
 

Users who are viewing this thread

Top