Jump to content

nilansanjaya

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Everything posted by nilansanjaya

  1. you should keep a record in the database and update the no.of views / downloads per song on the database. or else in a flat file.
  2. try using, <?php header("Location: path_to_fail_page.php"); ?>
  3. if you want to do it with pure php ( and little bit of javascript. not ajax ) just submit the form to the same page , on the onchange method of the select, using javascript, then capture the values on the top and do what you want to do <select name="select_name" onChange="document.form_name.submit();">
  4. so what help you exactly need ? a way to do it ? ideas ? codes?
  5. query the database and get the details. then, while( $row = mysql_fetch_array($results) ){ echo 'id: '.$row['id'].'<br />'; echo 'id: '.$row['tamil'].'<br />'; echo 'id: '.$row['english'].'<br />'; echo 'id: '.$row['maths'].'<br />'; } you can do the html formatting part as you want. its just a example
  6. are you getting a php error or a mysql error ?
  7. did you checked the mysql user's permission on that database ?
  8. link isn't empty. its the database link mysql_connect('localhost', 'testusr', 'testpw'); better to use a different variable for sql , ex: $query
  9. this , mysql_query ($link); should be mysql_query ($query); and use $query = "sql query here"; between the if statement , like i mentioned before
  10. try this <?php $link = mysql_connect('localhost', 'testusr', 'testpw'); mysql_select_db('testdb', $link); $email = $_POST['e-mail']; $query = ""; if ($_POST['action'] == 'Register') { if ($_POST['newsletter'] == 'Mens') { $query = "INSERT INTO newsletters(mens) VALUES('$email')"; } elseif ($_POST['newsletter'] == 'Mens & Womens') { $query = "INSERT INTO newsletters(mensandwomens) VALUES('$email')"; } elseif ($_POST['newsletter'] == 'Womens') { $query = "INSERT INTO newsletters(womens) VALUES('$email')"; } ;} mysql_query ($link, $query); mysql_close($link); ?>
  11. you cant just use "$query =" and put a if statement in the middle like that
  12. can u explain whats goin on ? and why friendly url's not working ? i guess its easily done using friendly url's ( mod_rewrite ) and bit of logic
  13. it should be <?php if ( $firstname == "Joe" && $lastname == "Shmo" ) { echo( "Welcome, Myself!" ); } else { echo( "Welcome, $_POST[firstname] $_POST[lastname]!" ); } ?>
  14. im not sure that a folder can be renamed inside a zip file. so i suggest you could extract it , make the change's and compress it back to a zip , unless some other person give's you a better solution
  15. tried this way ? rename("folder1/old","folder1/new");
  16. hey thanks well...dat was cool... but i need a one which can send to gtalk , msn ( etc ) services yeah im sorry , i forgot to mention that one properly. thanks again for finding dat
  17. yeah but.. in this case , i dont want 2 user's to chat. just user's and my script ( auto )
  18. thanks , bt wat u mean ? i want a way to SEND AND RECEIVE IM msgs like gtalk and all.
  19. hey guys , any idea how can i send and recive IM's through a php script ? not a chat. but a automatic script.where i could reply according to the IM other person sends ya something like a chat bot.... but for some other work please help !
  20. agree with that...cant think of anything else at the moment
  21. <?php //my sql connection goes here. $sql = "select * from yourtablename"; $results = mysql_query($sql); echo "<table><tr><th>title</th><th>id2</th></tr>"; while($row = mysql_fetch_array($results)){ <tr><td>$row['title']</td><td>$row['id2']</td></tr>; } echo "</table>"; ?>
  22. u gonna pay me ? lolz
  23. If you're dealing with dates from before the year 1700 why would you need timestamp accuracy in the first place, but anyway its impossible since the valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.) The problem with Windows is that it doesn't support negative timestamps. So the question remains, why do you need timestamps from that long ago, you wouldn't have had records to the second anyway. I'm sure that back then records to the day if not even month could have been inaccurate....
  24. to b honest , i ddn read all your code but anywy ive attached a pagination class. use it ! [attachment deleted by admin]
×
×
  • 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.