Jump to content

PradeepKr

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

About PradeepKr

  • Birthday 04/13/1983

Contact Methods

  • Website URL
    http://www.expertsguide.info/

Profile Information

  • Gender
    Not Telling

PradeepKr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. May be this is what you are looking for, IndexIgnore * Check stop indexing for more info.
  2. descr not desc SELECT * FROM blog ORDER BY descr
  3. Put this in your .htaccess file (of course create your custom page and name it "my-401-page.php") ErrorDocument 401 /my-401-page.php
  4. I usually take care of .html and .htm extensions in putting a question mark just after .html (html?). This works for both the extensions .htm as well as .html. RewriteRule ^[a-zA-Z0-9-]+_([0-9]+)\.html? /item.php?id=$1
  5. Probably you need this RewriteRule ^(.*)\.html?$ $1.php [NC]
  6. 1. Go to phpmyadmin or MySQL commandline, 2. Run this, UPDATE tbl_user SET user_password = PASSWORD('test') WHERE user_name = 'your_user_name'; 3. If the query is successful, try running your php from browser with the password "test".
  7. Replace this if(isset($_GET['action']) && $_GET['action'] == 'delete') {mysql_query("DELETE FROM blog WHERE name='". realEscape('name') ."'") or die(mysql_error());echo "News Deleted";} with this if(isset($_GET['action']) && $_GET['action'] == 'delete') { $name = realEscape($r["name"]); if( isset($name) && $name != "") { $sql_delete = sprintf("DELETE FROM blog WHERE name='%s' ", realEscape($r["name"]) ); echo "SQL is |$sql_delete|"; //remove after debugging mysql_query("DELETE FROM blog WHERE name='". realEscape('name') ."'") or die(mysql_error()); echo "News Deleted"; } else { echo "name is empty"; }}
  8. May be it is realEscape($r["name"]) and not realEscape('name')
  9. You should note that the password is decided by mysql function PASWORD() in your SQL. So, try checking the real password in your table "user" for the password you are entering. SELECT PASSWORD('mypass'); Note: if you are entering password as 'mypass' it would be converted to a long string and stored in the table.
  10. I would first confirm that the last character is comma itself, before trimming it. Just as a precaution that I don't accidentally delete any other character, <?php $buffer = ""; while($current_month<10) { $buffer .= "[". $current_month .",". number_format($remaining_balance, "2", ".", ",") . "],"; } if( substr("abcdef", -1) == ',') print(substr($buffer, 0, -1)); //Remove the last character and print ?>
  11. Put this just before your query, if($str[0]==',') { $str = substr($str,1); } $query="SELECT * FROM workorders a INNER JOIN customers b ON a.customer_id = b.customer_id WHERE a.workorder_status IN (".$str.") ORDER BY a.workorder_id";
  12. Don't know if it will work or not, never tried. But saw this article, may be you can go through this http://evolt.org/incoming_mail_and_php
  13. work around for this problem here
  14. check correct syntax http://php.net/manual/en/function.mysql-query.php and http://www.php.net/manual/en/function.mysql-select-db.php //SERVER 1 $link = mysql_connect("localhost","usern1","pw1"); mysql_select_db("db_one1", $link); $query = "INSERT INTO db1(subject, search, News, img) VALUES('$hsubject','$key','$news','$img')"; $result = mysql_query($query, $link); if(mysql_num_rows($result) == 0) { $sentOk = "The data has been added to the database."; echo "sentOk=" . $sentOk; } //SERVER 2 $link = mysql_connect("xxx.xxx.xx.xxx","usern2","pw2"); mysql_select_db("db_one2", $link); $query = "INSERT INTO db2(subject, search, News, img) VALUES('$hsubject','$key','$news','$img')"; $result = mysql_query($query, $link); if(mysql_num_rows($result) == 0) { $sentOk = "The data has been added to the database."; echo "sentOk=" . $sentOk; }
  15. How about using htaccess file.
×
×
  • 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.