Jump to content

priti

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by priti

  1. hi, kindly change ajax.open("GET",url,true); this with ajax.open("GET",url,false); regards
  2. Hi, Well i haven't tried any chat application in AJAX but how about you explore the networking possibilities in PHP????? Welll let me try weather its possible in PHP or not like this By that time you can explore ajax chat script from net. Regards,
  3. Hello, I think fsockopen() or CURL doesn't depend on this parameter.I had tested it.pls reproduce 1.switch of allow_url_fopen 2.run the below script with filename changes <?php if( ini_get( 'allow_url_fopen' )) { echo 'url fopen is open'; } else { echo "url fopen is off" ; } $fp = fsockopen("localhost", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET test.txt HTTP/1.1\r\n"; //change file name $out .= "Host: localhost \r\n"; $out .= "Connection: Close\r\n\r\n"; echo $out; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> allow_url_fopen paramter affects functions like fopen(remote url),file(),file_get_content. anywayz i would be googling more for this issue and as far as i know CURL is an external lib and never read that it depend on this parameter. kindly let me know weather above script worked or not. Regards
  4. Hi, This code worked for me. kindly check the location if serverTime.php .According to the script it should be in the same dir. regards
  5. Can someone explain why to take hidden values to solve this problem???
  6. Hi, Think that you are getting register and at the same time some else also hitting the server and trying to get register.Now for you and for the other fellow server will run different thread to finish the work and return the response.Have you ever seen that you get registered and you are getting someone else confirmation on screen??/ So when you are creating an image the image processing will be done of your end (think of uploading an avatar on your profile) .This work is done in your session.hence none other will get this image until and unless it is coded like that i.e to show all image uploaded or processed in 1 min or so :-). regards
  7. Well your coding is confused me kindly run this script and you will get the idea how you can get the name of your textarea <?php $a=array('1','2','3');?> <form action="<?php $_SERVER['PHP_SELF']?>" method='post'> <?php foreach($a as $k) { echo '<textarea name="body_'.$k['id'].'" cols="50" rows="3"></textarea>'; ///from your piece of code } echo '<input type="submit" name="submit" value="submit">'; echo '</form>'; if(isset($_POST)) { print_r($_POST); } ?> Hope it helps, Regards
  8. Hi, It 's very simple If and else ... 1.mysql_num_rows return number of records fetched form your query. So 2.if number of record == 1 then row = mysql_fetch_assoc($query); script tries to fetch the data from the recordset after that 3. if($row['Active'] == 1) { session_start(); $_SESSION['user_id'] = $row['ID']; $_SESSION['logged_in'] = TRUE; header("Location: members.php"); } else { $error = 'Your membership was not activated. Please open the email that we sent and click on the activation link'; } 4. Above snippet explain if you are active member then user's info is inserted in $_SESSION and redirected to members.php page BUT if you active state is not 1 then message will get display ($error). 5. IF mysql_num_rows($query) is not equals 1 then $error = 'Login failed !'; //For this else there is one missing IF condition .In your code provided that is missing. else { $error = 'Please use both your username and password to access your account'; } Hope it gives a fair amount of knowledge to you to understand what this script is doing. Regards
  9. Hi, Explore Drupal.It suites your needs.Drupal is a free content management system which allow all what you are searching for. Happy exploring!! Regards
  10. Hi, refer http://www.ip2location.com/ regards
  11. hi, how about to use wordpress it will give you these reqirement and also there is a extension called Page Link Manager Plugin which might give you a added advantage. regards
  12. Hi, Try use fsockopen() or CUrl to access remote urls. regards
  13. Hi, Making AJAX POST request is very easy if you are aware of simple ajax stuff. http_request = new XMLHttpRequest(); //XMLHttpRequest method has to be defined to create xmlHttprequest http_request.onreadystatechange = function() {s=alertContents(http_request)}; frmstr='name=priti?age=25&gender=f&job=yes&designation=developer'; http_request.open('POST', "./tests.php", true); http_request.send(frmstr); And if you don't want to use this go for jquery ajax.It is easy and smooth. regards
  14. hello dear, I was debugging the issue and i see some detailed error Error: uncaught exception: [Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "http://content.gannettonline.com/global/s_code/s_code.js Line: 446"] kindly in to s_code.js.I think you should try to remove error with s i.e s has no properties http://www.timesofacadiana.com/scripts/s_local_customization.js Line 2 there is something related with this s. kindly share if you are able to solve or else let me know what this 's' is all about which is causing second error. regards
  15. Here i See...response in CAPS $query = mysql_query("SELECT text FROM table WHERE something = '$something' "); --YOU FETCHED TEXT while($row = mysql_fetch_assoc($query)) --RUNNING A LOOP TO INSERT THE FETCHED TEXT $insert = mysql_query("INSERT INTO table (1,2,3,4) VALUES ('$id','$something','$something', '{$row['text']}') "); --here you are inserting the fetched and form posted data.If your register_global in php.ini is off then you have to fetch posted form data values from $_POST array.you should not use {} in query i never use it in plain queries.Even till now you are not able to get the idea then copy the query and run in SQL mode in mysql and see what output you are receiving. the logic seems to be alright but because you are not posting the correct piece of code it would be diffcult for any one to help you. anyways try these hope it solves your problem .
  16. Hello, If i am write then you want to upload the image file and see on the same page withot refreshing the whole page. If this is true then try to get help of AJAX to upload the file.Let me remind you cann't do fileuploads with ajx but there is a trick to do that.It will help you to upload the file and then your can read and show the image as soon as it is in the location. try to find or google class called AjaxFileUploader.I had worked with the same but its a big set of file i cann't attach or share here.Hope it work for you also. Happy coding Regards
  17. Hello, Two ways you can do 1.create the html in php and return i.e your responseText='<td>name</td><td>age</td><td>class</td>' and print this directly. 2.return a string with a delimiter name-age-class hence your response text would be name-age-class then in javascript your can split this with the help of delimiter '-' and show as you want in the javascript. Hope it helps Regards
  18. Have you declared id=description in HTML form??? is javascript is able to read and print the value? regards
  19. Hello rekha, In start of script try to declare variable S make it global through out the javascript. regards,
  20. I am not able to see any image.
  21. Hello rekha, Its simple if your print variable before if(s==false) it will print 'undefined' . you have defined var s in the function but it is initialsed in other funtion either you make s global in this script or edit your script as follow http_request.onreadystatechange = function() {s=alertContents(http_request); if(s === false) { alert("not entered"); return false; } else { alert('return ture'); return true; } It work gr8 in both way hope you have good time ahead in coding regards
  22. Hello , kindly check http.open('get', 'imagelist.php?action='+(action?action:"")); line of code for proper formation of URL and secondly, when we make a get request write http.send(null). Regards
×
×
  • 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.