Jump to content

nilansanjaya

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://nilansanjaya.com

Profile Information

  • Gender
    Not Telling

nilansanjaya's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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
×
×
  • 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.