
spaceman12
Members-
Posts
73 -
Joined
-
Last visited
Never
Everything posted by spaceman12
-
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
-
unless your time.php file is echoing out some vlues, it wont.
-
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>
-
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" ; ?>
-
i can create all that for u but it aint so easy work. Perhaps, some few $$$ will do. Message me if u r interested
-
keep banner.txt on the same folder as the php file.
-
<?php $getFILE=file_get_contents('banners.txt'); $arrFILE=explode("::", $getFILE); $shuffleFILE=mt_rand(0,count($arrFILE)-1); echo $arrFILE[$shuffleFILE]; ?>
-
email not sent on post data/ submit button
spaceman12 replied to diasansley's topic in PHP Coding Help
foreach ($_POST as $value) { if(!empty($value)) { //your code } else echo "Please fill in your infos"; } -
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
-
it still returns me the total number of rows and not only those that are not empty
-
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
-
$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
-
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
-
Syntax question, formatting date from a sql recordset...
spaceman12 replied to shamwowy's topic in PHP Coding Help
$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()); -
thank you so much
-
Slashes being put in front of apostrophes SOMETIMES?!?!
spaceman12 replied to galvin's topic in PHP Coding Help
<?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 -
Slashes being put in front of apostrophes SOMETIMES?!?!
spaceman12 replied to galvin's topic in PHP Coding Help
use stripslashes() before $_POST -
$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
-
HELP - Inserting two same variables into the same row of DB
spaceman12 replied to spaceman12's topic in PHP Coding Help
well,,,sorry for the wrong quotation but it just remain the same even after the alteration,,,,,,thnx -
HELP - Inserting two same variables into the same row of DB
spaceman12 replied to spaceman12's topic in PHP Coding Help
$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); -
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
-
skipping a row in mysql_fetch_array until an argument is valid
spaceman12 replied to djscoop's topic in PHP Coding Help
if(!$alreadyv == 1) and it will automatically skip by itself provided you remove off the "ELSE " -
echo out with line breaks and paragraphs set
spaceman12 replied to spaceman12's topic in PHP Coding Help
Thank you so much...............it so worked out like a charms......