Jump to content

yoursanjay

Members
  • Content Count

    35
  • Joined

  • Last visited

Community Reputation

0 Neutral

About yoursanjay

  • Rank
    Newbie
  • Birthday 01/18/1982
  1. I know that it is a basic feature script. Actually I am working on other advanced features over this script. If I found any script that fulfills this basic requirement then I can add the advanced features over this. It will save my few days of coding. @niche thanks a lot for your suggestion. If there is no such script available then I will have to code that module by myself.
  2. I need an opensourece e-commerce script (PHP/MySql) where members can add their products for sell on the site. After certain period members can get their payment after deduction some % of fees.Your suggestion will be greatly appreciated.Thanks,
  3. Still it is not working. I have put mu .htaccess file inside htdocs/sanjay/demo/ folder and in it written the following code: Options -MultiViewsRewriteEngine OnRewriteRule ^sanjay/demo/service/?$ /sanjay/demo/index.php?pageId=9 [L] Have I done any wrong?
  4. Thanks for your reply. But it is not working. I have tested in my local server where htaccess supports. The link URL is : http://localhost/sanjay/demo/index.php?pageId=9 and I want to convert the URL in the Address bar as http://localhost/sanjay/demo/service when I click on the dynamic URL.I have tried the following 2 htaccess alternatively but no one works. Options -Multiviews RewriteEngine On RewriteRule ^sanjay/demo/service$ /?pageId=9 [L] or Options -Multiviews RewriteEngine On RewriteRule ^service$ /?pageId=9 [L]
  5. Hello,I have a dynamic website where all the pages and sections are pulling out from Dynamic URLs like http://www.mysite.com?pageId=5 or http://www.mysite.com?pageId=9There are hundreds of these type of links placed in my site and now I prefer to display static URL in the address bar. For example,If any user click on the link 'http://www.mysite.com?pageId=5', in the address bar the URL it will be converted to 'http://www.mysite.com/service.html' and if clicked on 'http://www.mysite.com?pageId=9', it will be converted to 'http://mysite.com/about,html' and so on.Will it can be done through htaccess file? If so, what should I write in the htaccess file?I can not change the dynamic URLs of my site right now because there are hundreds of links are in my site. Please suggest.
  6. Hello Every one,I want to add a simple e learning module with online test system in my site where there will be some content for learning and after that some online test (multiple choice or true false). I prefer some moderator for by topic wise and for the test. Is there any simple open source PHP, MYSQL script available? I have already tried ATutor, Moodle but they all are very large in size and have lot of functions & sections. I need a simple one with light in size. Any suggestion??
  7. I have been facing a problem with data input through text editor (same problem for maximum opensource text editor)I have to insert content into mysql database and the content has the output in the HTMl format. I use both of the htmlspecialchars() and mysql_real_escape_string expression to provide security at the time of Data input.I have seen that if there is "", or ' in the content, the content can't be inserted otherwise it is ok. The same code some times go perfectly in the differerent server.I generally use like or or My question: is the problem for server related while some times I didn't get any error in some servers and never in localhost.When I get the output in the HTML format, there I always find some junk data like 'rn' and every time can not render ' & " sign. In the HTMl I always find some others like <br>, the URL or link changes always and some % sign also.Please Help.
  8. I have faced a problem with related to this topic for a long time. I have to insert content into mysql database and the content has the output in the HTMl format. I use both of the htmlspecialchars() and mysql_real_escape_string expression to provide security at the time of Data input.I have seen that if there is "", or ' in the content, the content can't be inserted otherwise it is ok. The same code some times go perfectly in the differerent server.I generally use like $x = htmlspecialchars($_REQUEST['content']);or $x = mysql_real_escape_string($_REQUEST['content']);or $x = htmlspecialchars(mysql_real_escape_string($_REQUEST['content']));My question: is the problem for server related while some times I didn't get any error in some servers and never in localhost.When I get the output in the HTML format, there I always find some junk data like 'rn' and every time can not render ' & " sign.Please Help.
  9. yoursanjay

    Dynamic Table?

    make 2 css for blue & white respectively.in the for or while loop whatever u use, find the row serial no is odd or even.make a if clause in the class section in the td like I think you can implement the concept with the Codes. It's very easy dude..
  10. How to implement this as I have not idea of MOD Rewrite?
  11. Hello,I have developed a program in PHP & MySQL and there is a membership section. After the member login the page goes to http://www.mydomain.com/member.php . All the functions are working properly. In my membership program user name of every user is unique. The issue is that at this moment I wish to show the URL of the member page after login as follows:http://www.mydomain.com/bluebell/member.php .Here bluebell is the user name. So, the main thing I need that the member.php page will be shown after the respective member's user name (/member/) in the URL. Is there any procedure that the member.php page wiil open but in the URL the above format will be shown. As, the full project has already been completed and I am very confused if I have to change the codes a lot or not. I am not familiar with MOD rewrite function.Please suggest and if possible provide me a sample code of this type URL conversion. Thanks...
  12. You can try PHPLIVEDOCX at http://www.phplivedocx.org/2009/02/06/conv...-to-pdf-in-php/Web Development: <snip>
  13. It is quite easy. I am writing the full code of such an application here:Here is 2 files: 1. index.php , 2. confirmation.php and I used result.txt to store the text dataindex.php <?phpif ($_REQUEST['submit']){ $psptext = $_REQUEST['psptext']; $filename = 'result.txt'; $fp = fopen ($filename,'w+'); if (fwrite ($fp,$psptext)) { header ("Location:confirmation.php?val=1"); fclose ($fp); exit; } else { header ("Location:confirmation.php?val=0"); fclose ($fp); exit; }}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>PSP Text Page</title></head><body>Type your Text Here:<p><form name="psp" method="post" action="index.php"><textarea name="psptext" rows="5" cols="30"></textarea><input type="submit" name="submit" value="Create Text File" /></form></p></body></html> confirmation.php <?php$val = $_GET['val'];switch ($val){ case 1: $msg1 = "Congrats!! Text File Created."; break; case 0: $msg0 = "Error Creating Text File.";}if ($_REQUEST['submit']){$fullPath = 'result.txt'; if ($fd = fopen ($fullPath,"r")) { $fsize = filesize($fullPath); $path_parts = pathinfo($fullPath); $ext = strtolower($path_parts["extension"]); switch ($ext) { case "txt": header("Content-type: txt"); // add here more headers for diff. extensions header("Content-Disposition: attachment; filename=\"".$path_parts["basename"]."\""); // use 'attachment' to force a download break; default; header("Content-type: application/octet-stream"); header("Content-Disposition: filename=\"".$path_parts["basename"]."\""); } header("Content-length: $fsize"); header("Cache-control: private"); //use this to open files directly while(!feof($fd)) { $buffer = fread($fd, 101240); echo $buffer; }}fclose ($fd);exit;}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Confirmation & Download Page</title></head><body><p> <?php if ($msg1) { echo $msg1; ?> <form name="form1" method="post" action="confirmation.php"> <input type="submit" name="submit" value="Download Text File"/> </form> <?php } else { echo $msg0; } ?></p></body></html> Put a text file called result.txt in the same folder of this application.
  14. yoursanjay

    Login Script

    Try the below one: <?php// Connects to your Databasemysql_connect("localhost", "user", "lpw") or die(mysql_error());mysql_select_db("Database_Name") or die(mysql_error());//This code runs if the form has been submittedif (isset($_POST['submit'])) {//This makes sure they did not leave any fields blankif (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) {die('You did not complete all of the required fields');}// checks if the username is in useif (!get_magic_quotes_gpc()) {$_POST['username'] = addslashes($_POST['username']);}$usercheck = $_POST['username'];$check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'")or die(mysql_error());$check2 = mysql_num_rows($check);//if the name exists it gives an errorif ($check2 != 0) {die('Sorry, the username '.$_POST['username'].' is already in use.');}// this makes sure both passwords entered matchif ($_POST['pass'] != $_POST['pass2']) {die('Your passwords did not match. ');}// here we encrypt the password and add slashes if needed$_POST['pass'] = md5($_POST['pass']);if (!get_magic_quotes_gpc()) {$_POST['pass'] = addslashes($_POST['pass']);$_POST['username'] = addslashes($_POST['username']);}// now we insert it into the database$insert = "INSERT INTO users (username, password)VALUES ('".$_POST['username']."', '".$_POST['pass']."')";$add_member = mysql_query($insert);}?>
  15. yoursanjay

    Google Maps

    You can try the following code. But, change the Google Map API key to your site's API Key in the code section found as "key=ABQIAAAAvp3__HwvT3VkixIIbsW0axQuKI_6t1bH2P0vCI_Q8jfpn8qdNBQMnneljxh9czilkau_bYSCXteS_A"
×
×
  • Create New...