Jump to content

PaXo

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by PaXo

  1. well i dont have a host yet, i was wondering how easy it is before i buy one thanks for reply though
  2. is it possible to create a email service (only a simple one) like hotmail... with a send and recieve ?? i no how to do the send but not recieve for example, if i created a username PaXo i would like it to auto create paxo@mysite.com so i could recieve them?? thanks!
  3. PaXo

    PHP Timer

    i dont understand what you mean? also how do i do it sorry, still learning the odd bits and bobs regards
  4. PaXo

    PHP Timer

    well what im doing is making a IRC bot through PHP and i want it so when someone types a command, it wont say it straight away, it will wait a couple of seconds and then say it to prevent spam regards
  5. PaXo

    PHP Timer

    is it possible, to have a timer in PHP, say i want it to excecute a command but not for lets say 2 seconds, is it possible to make it wait 2 seconds and then excecute it? regards
  6. ok, first problem is the login: ill tell you how my site is setup first so it all makes sence: this is the folders: cod4 (main - with index.php and viewuser.php so far) -layout(sub folder with header.php and footer.php) -blocks (sub folder with stuff like latest news) --login (sub folder in blocks which is where login.php is) ok, in index.php i have my login.php a included in the code and this is the only way i could think of doing it so it would work (please give me ideas if its not the only way) but i still cant get this to work (its the submit button (which is an image) which dosnt work): <?php if($_POST['submit']){ ?> <div id="login"> Incorrect information <META HTTP-EQUIV="refresh" CONTENT="3;URL=index.php"> </div> <?php } else{ ?> <div id="login"> <form action="login.php" method="post"> <input type="text" class="text-inp" name="username" value="USERNAME" /> <input type="password" class="text-inp" name="password" value="PASSWORD" /> <input type="image" src="./images/button_input_bg.gif" class="button" name="submit" value="" /> </form> </div> <?php } ?> thats the first problem which i cant get to work, when you click the submit button, it dosnt do anything and it still shows the login box :/ -- this is the second problem, in my database i have the user_id which is 1 and the user_nickname which is Administrator and for some reason, this code is giving this error message: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\cod4\viewuser.php on line 19 this is the whole script: <?php include('layout\header.php'); session_start(); ?> <!-- OP:MIDDLE COLUMN --> <div id="middle"> <h2>User Profile</h2> <div class="main"> <div class="inner"> <img src="images/main_cont_bg_top.gif" alt="" /> <!-- INSERT MAIN CONTENT HERE --> <?php $user_id = $_GET['id']; $query = 'SELECT * FROM users WHERE user_id = $user_id ORDER BY user_id'; $result = mysql_query($query); while($row=mysql_fetch_array($result)) { $user_nickname = $row['user_nickname']; } ?> <h3><?php echo $user_nickname; ?></h3> <!-- / INSERT MAIN CONTENT HERE --> <img src="images/main_cont_bg_bottom.gif" alt="" /> </div> </div> <!-- OP:EDIT FLAG 2 --> <!-- END OP:EDIT FLAG 2 --> </div> <!-- / OP:MIDDLE COLUMN --> <?php include('layout\footer.php'); ?> the url im using is http://localhost/cod4/viewuser.php?id=1 but i cant think why it wont work. any help is really greatful. thanks
  7. this is the page output: SELECT comments.comment_image, album.image_id FROM album, comments WHERE comment_image = image_id ORDER BY comment_id Resource id #5 this is the updated code: <?php mysql_select_db('comments'); $query = "SELECT comments.comment_image, album.image_id FROM album, comments WHERE comment_image = image_id ORDER BY comment_id"; $result = mysql_query($query) or die (mysql_error()); echo $query; echo '<br>'; echo $result; while($row=mysql_fetch_array($result)) { $comment_id = $row['comment_id']; $comment_user = $row['comment_user']; $comment_email = $row['comment_email']; $comment_ip = $row['comment_ip']; $comment_content = $row['comment_content']; $comment_time = $row['comment_time']; $comment_date = $row['comment_date']; echo $comment_user; echo $comment_content; } ?> so it dosnt say anything is wrong with the query :/ (thatim aware of, code nos what resource id 5 is but ... thanks
  8. unfortunatly that didnt work, heres the updated code: <?php mysql_select_db('comments'); $query = "SELECT comments.comment_image, album.image_id FROM album, comments WHERE comment_image = image_id ORDER BY comment_id"; $result = mysql_query($query); while($row=mysql_fetch_array($result)) { $comment_id = $row['comment_id']; $comment_user = $row['comment_user']; $comment_email = $row['comment_email']; $comment_ip = $row['comment_ip']; $comment_content = $row['comment_content']; $comment_time = $row['comment_time']; $comment_date = $row['comment_date']; echo $comment_user; echo $comment_content; } ?> thanks for the quick reply though!
  9. <?php mysql_select_db('comments'); $query = "SELECT comments.comment_image, album.image_id FROM album, comments WHERE comment_image = image_id ORDER BY comment_id"; $result = mysql_query($query); while($row=mysql_fetch_array($result)) { $comment_id = $row['comment_id']; $comment_user = $row['comment_user']; $comment_email = $row['comment_email']; $comment_ip = $row['comment_ip']; $comment_content = $row['comment_content']; $comment_time = $row['comment_time']; $comment_date = $row['comment_date']; } echo $comment_user; echo $comment_content; ?> that is the code but it dosnt display the echos, there is information in the database but i dont have a clue why it wont display any help is much loved <3
×
×
  • 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.