Jump to content

robert_gsfame

Members
  • Posts

    876
  • Joined

  • Last visited

Everything posted by robert_gsfame

  1. i have listbox which contain of day, month and year Month should generate number of days, for example if i choose Feb then it will check whether leap year and generate days for(i=1;i<parseInt(totaldays)+1;i++){ var totaldays="<option value='"+i+"'>"+i+"</option>"; var all=xyz+totaldays; xyz=all;} document.getElementById("myday").innerHTML="<select id=cday onchange=changethis() >"+all+"</select>"; Problem: all works well but when i choose 30 from day listbox, it will automatically return to 1. which part is wrong? please give me a clue thx
  2. Try passing the value into javascript function so instead of doing right away like what you did <div class="menutitles" onmouseover="document.getElementById('ha').style.display='block';document.getElementById('ha2').style.display='block';" > try: <head> <script type="text/javascript"> function setblock(){ document.getElementById('ha').style.display='block';document.getElementById('ha2').style.display='block';} </script> </head> <body> <div class="menutitles" onmouseover="setblock()"> </body> hope it helps
  3. I wish to find the textual day of this date (note:*yyyy-mm-dd) 2009-05-19 how can i do this
  4. haha...wrongly typed Thx a lot thorpe! when do the coding i was almost fell asleep
  5. I have this code <?php $exp=explode("-","2010-09-20"); $first=$exp[0]+10; $last=$exp[0]-10; for($i=$first;$i<$last;$i++){ echo $i;}?> no result appear...which part is wrong? thx
  6. I have this query SELECT * FROM table1 WHERE date BETWEEN '2010-05-05' AND '2009-05-05' but i dont get any result ???which part needs to be modified thx
  7. i have problem with this query UPDATE table1 SET column1='test' WHERE column1 IS NULL LIMIT 20 OFFSET 21 this will cause error...how can i make this query work.. I wish to update table and as i dont have anything such as id to be used as ORDER BY so i use OFFSET
  8. :D okay! again thx for your help!!!
  9. Thx so much mr Adam.....it works perfect!!!! what is actually the last part of the pattern used for $/i can give me some short explanation ? :P
  10. there is nothing to do with alphanumeric....i just want to check that a text must at least has both number and letter...therefore it is also allowed to have special characters in the text
  11. what i want is a text must consist of a combination of letter and number....if one missing then alert(),
  12. How can i show the alert once text doesn't consist of number and alphabet using RegExp? thx
  13. you're right...i didnt read his whole code especially this part echo (' & <tbody I think he could modify his own code as i only give the solution on looping part like what the subject of this topic is
  14. And this what i did with your code $bg1="#FFFFFF"; $bg2="#000000"; $bg3=$bg1; while($row = mysql_fetch_assoc($result)) { echo (' <tbody> <tr> <td bgcolor=$bg3>' . $row['first_name'] . '</td> <td bgcolor=$bg3>' . $row['post_code'] . '</td> <td bgcolor=$bg3>' . $row['team_supported'] . '</td> </tr> </tbody> '); if($bg3==$bg1){ $bg3=$bg2;} elseif($bg3==$bg2){ $bg3=$bg1;} } echo "</table>";
  15. very easy before while() set your color assume this $bg1="#FFFFFF"; $bg2="#000000"; $bg3=$bg1; while loop set your <td bgcolor=$bg3> at the end of the loop set like this if($bg3==$bg1){ $bg3=$bg2;} elseif($bg3==$bg2){ $bg3=$bg1;} as simple as that.hope it helps
  16. Based on the error, something wrong while inserting the record and you are not really changing your code into what i said $sql = "INSERT INTO Users (Email, Country, IP) VALUES ('$email', '$Country', '$ip')"; see the bold single quotes
  17. <?php echo $_SERVER['PHP_SELF']."?register=true" ?>
  18. change this $sql = "INSERT INTO tblUsers (fldEmail, fldCountry, fldIP) VALUES ($email, $Country, $ip);"; into this $sql = "INSERT INTO tblUsers (fldEmail, fldCountry, fldIP) VALUES ('$email', '$Country','$ip')",
  19. i have this code if(!empty($_SESSION['username'])){ $val="window.location.href='test1.php'";}else{ $val="alert('Need login session')";} echo "<input type=button value=Button onclick=$val>"; when i change the $val alert with alert('Login'), it works..... so the problem is that the alert cannot contain space..how can i do this? thanks
  20. Sorry this is the real problem ... $myfirstcontent=nl2br($text); $quote=mysql_fetch_array($query['mynama']); $changethis=array('',' '); $withthis=array('<img src=bar/emoticon_tongue.gif>','<div class=scroll>$quote','</div><br>'); $content=str_replace($changethis,$withthis,$myfirstcontent);
  21. i have this php $string="Myname"; echo '$string'; how can i escape so that i can get Myname as a result
  22. Assume i have this text $string=[blabla]this is my text between tag[/blabla]and this is text outside tag n how can i get everything outside tag and put it in $string2 and everything between tag into $string3 so i wish to have $string2 with "this is my text between tag" and $string3 with "this is text outside tag" text between and outside tag are dynamic Thx
×
×
  • 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.