Jump to content

spaceman12

Members
  • Posts

    73
  • Joined

  • Last visited

    Never

Everything posted by spaceman12

  1. Perhaps, if you can make a rough sketch of how you want to make your output look like, i can surely help you. Cause, I'm not fully understanding by what you actually meant
  2. unless your time.php file is echoing out some vlues, it wont.
  3. Hope that fixed your problem. <table style='table-layout:fixed' align="center" cellpadding="2" cellspacing="0" colspan="" class="Main"><br> <? $select_paper=mysql_query("SELECT * FROM paper ORDER BY id DESC"); while($the=mysql_fetch_object($select_paper)){ ?> <tr> <td class="subtableheader" width="25%"><?php echo "$the->title"; ?></td><td class="profilerow" width="100%"><?php echo "$the->news"; ?></td> </tr> <tr> <td class="subtableheader" width="25%"><?php echo "Article By $the->by - $the->date"; ?></td> </tr>
  4. try this <?php $ip = $_SERVER['REMOTE_ADDR']; $date = date("m.d.y"); $time = time(); $connect=mysql_connect ("localhost", "root", "********") or die(mysql_error()); mysql_select_db("ip", $connect); $query = "INSERT INTO ipdo (time, date, ip) VALUES('$time', '$date', '$ip')"; mysql_query($query) or die (mysql_error()); echo "Database updated with: $ip" ; ?>
  5. i can create all that for u but it aint so easy work. Perhaps, some few $$$ will do. Message me if u r interested
  6. keep banner.txt on the same folder as the php file.
  7. <?php $getFILE=file_get_contents('banners.txt'); $arrFILE=explode("::", $getFILE); $shuffleFILE=mt_rand(0,count($arrFILE)-1); echo $arrFILE[$shuffleFILE]; ?>
  8. foreach ($_POST as $value) { if(!empty($value)) { //your code } else echo "Please fill in your infos"; }
  9. Please help to refresh the src=' ' in within the iframe tag. the code I used is <script type='text/javascript'> var xmlhttp; function callAjax() { var str=document.getElementById('chat').value; if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject('Microsoft.XMLHTTP'); } xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById('iframe_chat').innerHTML=xmlhttp.responseText; } } xmlhttp.open('post', 'forum_chat.php', true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send('chat='+str); } </script> All is working fine except the SRC dont refresh each time the ajax function is called unless i refresh the whole page to view the updates result. thank you
  10. it still returns me the total number of rows and not only those that are not empty
  11. Sombody please help me and tell me a way as how to count only non-empty cells in a column contained in a table of a database. Thank you
  12. spaceman12

    COUNT

    $locateREF="SELECT COUNT($uin) FROM referral_system WHERE $uin IS NOT NULL"; $getREF=mysql_query($locateREF); $fetch=mysql_fetch_row($getREF); $total=$fetch[0]; echo $total; Here $uin is for any user
  13. spaceman12

    COUNT

    Hello guys, suppose belows is a table and i'm trying to count all the non empty cells for each column. However, when I tried to do so, it always return 6 and I fail to accomplish the condition I so desired to execute. Please help me. user1 user2 user3 123 345 343 435 355 555 545 555 Thank you
  14. $time_now=mktime(date('h')+5,date('i')+30,date('s')); $time=date('h:i:s A',$time_now); $date=date('D, M,Y'); $insertDATE_TIME="INSERT INTO table(Date, Time, field1,field2,,,,,,,,,,) VALUES('".$date."', '$time', 'field1',,,,,,,,,,,,,,,,,,,)"; mysql_query($insertDATE_TIME) or die(mysql_query());
  15. <?php if(get_magic_quotes_gpc()) echo "Magic quotes enabled"; else echo "no magic quotes detected"; ?> If you get displayed Magic quotes enabled, use stripslashes($_POSTt['variable']) for each $_POST
  16. $loc="SELECT * FROM table WHERE username='a', id='1' AND uin='123'"; $get=myspl_query($loc) or die(mysql_error()); Please somone tell me the right command as how to use multiple AND in mysql query. Thanks
  17. well,,,sorry for the wrong quotation but it just remain the same even after the alteration,,,,,,thnx
  18. $insertMES="INSERT INTO messaging( Date, Time, Subject, Message, From_User, To_User, Message_Alert, IP, Sender) VALUES( '".$date."', '".$time."', '".mysql_real_escape_string($subject)."', '".mysql_real_escape_string($message)."', '".$_SESSION['Username']."', '".$send_to."', '".mysql_real_escape_string($message_alert)."', '".$IP."', '."$_SESSION[username]."')"; mysql_query($insertMES);
  19. how do i insert two same values bearing variable into the same row though different column into a database? Insertion was successful but at the end I always end up getin an error for which I was not allowed a redirection...thanx error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') VALUES('spaceman12', 'ja')' at line 1
  20. if(!$alreadyv == 1) and it will automatically skip by itself provided you remove off the "ELSE "
  21. Hello, I just wanna know if any such commands are available in php for making a variable as such like - $variable = " blah blah .. . . . index.php?X=<?php echo $_GET['x']; ?>..........blah"; thank you
  22. Thank you so much...............it so worked out like a charms......
×
×
  • 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.