Jump to content

Piba

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Female

Piba's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello guys, In the past, i used the Sphider search engine on the Apache server, and it was working fine until I changed the server to an IIS server and it is not working well rightnow. It is not indexing the dynamic pages. The keywords used to be 17,000 and now they are only 5,000. One more problem, if I searched for a word that doesn't exist in the keywords, the sphider says did you mean "the word i enterd". Example: if I searched for "car" and car doesn't exist in the keywords, the Spider says: did you mean "car"? I'm using now Sphider-plus version, here is the link for the https://sourceforge.net/project/show...roup_id=214642 Any idea about my problem??? Thanks, Piba
  2. Hi gizmola, My problem is solved All my problem was from the version of the client, it doesn't support the arabic language I installed an Express edition and it's fine now Thanks alot for your always support and help Regards, Piba
  3. Hello guys, I'm using oracle instant client version 11.1.0.6.0 And i want to retreive data that is arabic, but the problem is it displayed all in question marks (????????????? ??????? ?????) I set the NLS_LANG variable to ARABIC_SAUDI ARABIA.AR8MSWIN1256 but the porblem is still be.. I tried also to set NLS_LANG variable to AMERICAN_AMERICA.AR8MSWIN1256 but also the problem is sitll there ??? any advise??????
  4. Hi gizmola, Thanks for replying, i read the site you suggested, it's really helpful.. But my problem now as the following: When i write in the "run": C:\Program Files\instantclient11 sqlplus username/password@db It response and oracle information was showup.. BUT...when i try to access database through php code, the same error is appeared So, is the problem from my code, or something inside the tnsname.ora? or the problem from the other server (which have oracle database)?? And BTW, i tried all three ways in the website with no respone Thanks, Piba
  5. Hello guys, Ok, i'm working on php/mysql but now i want to deal with oracle (on other server), So i installed instantclient-sqlplus-win32 for oracle, and when i open phpinfo page, the oci8 is enabled But my problem is when i connect to db, this error is show up ORA-12154: TNS:could not resolve the connect identifier specified My coonect code: <?php // try connecting to the database $conn = oci_connect('username', 'password', 'host'); // check for any errors if (!$conn) { $e = oci_error(); print htmlentities($e['message']); exit; } // else there weren't any errors else { echo 'I am an Oracle mack daddy.'; } ?> I checked from the file tnsname.ora But when i searched on google to find solution, i read that it should be a file named sqlnet.ora And i don't have this file... Is this my problem?? Shall i got both sqlnet.ora and tnsname.ora files?? Please i need help as soon as possible Thanks
  6. Aha I'm a little bit embarressed Thanks alot haku I really appreaciate your help Have a nice day Best Regards, Piba
  7. Ok..Could you please explain to me why this is a wrong?? I store id (auto-increment) and then take the id and store it in the session.. So, where is mistake?? Thanks alot
  8. IS THERE ANY CHANCE THAT THE SESSION DOESN'T STORE THE VALUE CORRECTLY??
  9. hello benphp... Ok..Could you figure out what is the error in my code???
  10. Hello......... Would anybody help please!!! :
  11. No, they were'nt two users on the same computer Maybe it's not overlapping, but i really dont know why user2 got error msg while he just start the form Ok.. I will place here the code, and explain it: First when the user open page1,fill and press button(Go to next stage) i will save in table4 an empty record: $table4= "INSERT INTO table4 VALUES('0','0000-00-00','0', '0')"; @mysql_query($fourth) or die(mysql_error()); $id=mysql_insert_id(); $_SESSION[id']=$id; session_write_close(); the first field of table4 is auto-increment id and then i will save the first page value: $table1= "INSERT INTO table1 VALUES('0', curdate(), '$_SESSION[id]', '$_POST[q1]','$_POST[q2]','$_POST[q3]')"; @mysql_query($table1) or die(mysql_error()); header("location:page2.php"); Ok..the page2 first check if user filled this page before or not: if(!(isset($_SESSION[id']))) header("location:errormsg1.php"); // the user is trying to access page2 before answer page1 $get_id=mysql_query("select user_id from table2 where user_id ='$_SESSION[id]'"); if(mysql_num_rows($get_id_res)!=0) header("location:errormsg2.php"); //if the user filled this page before else { body of page2 } Then when he press button(Go to next stage) i will save in table2: $table2= "INSERT INTO table2 VALUES('0', curdate(), '$_SESSION[id]', '$_POST[q1]','$_POST[q2]','$_POST[q3]')"; @mysql_query($table2) or die(mysql_error()); header("location:page3.php"); The same for page3 and page4, except that in page4 will be updated: $table4= "UPDATE table4 SET date=curdate(), name='$_POST[name]', age='$_POST[age]' WHERE id=$_SESSION[user_id]"; @mysql_query($table4) or die(mysql_error()); header("location:index.php"); I see that the record in table4 with id=1 is replaced with record of id=2 And sometimes as i said before, when user2 going from page1 to page2, errormsg2 tells him that he filled before!!!! Is there any problem with my query?? I'm really got confiused ??? ??? Thanks alot GingerRobot for helping
  12. Hello GingerRobot, Thanks for replying:) But i don't want to transfer the id through url, that will be visible to users I want through $_POST For session: Actually i used before in this form session method, but i got alot of problem, Not in programming but in saving data I will explain to you my old way using session, so if you can help, this would be better i have a multi-page form, lets say from 4 pages... in the first page, insert empty values in table1 to get automatic id for user: mysql_query("INSERT INTO table1 VALUES('0','0000-00-00','0')"); $id=mysql_insert_id(); $_SESSION['id']=$id; session_write_close(); After that, i save user's answers in table1,2,3,4 WHERE id=$_SESSION[id] And ofcourse update table1 WHERE id=$_SESSION[id] Also, each page there will be check if user fill the page before or not My problem is when two users at the same time start filling the form, the session is changed and user1 got an error message that he already filled this page (according to user2 session not his) I dont know excatly what is the problem??? Can you figure out?? Thanks
  13. Hello quys, I have a question please, I have a multi-page form, and i post values from one page to another just like this: <input type=hidden name=q1 value=$_POST[q1]> .... Ofcourse, this will be by making the action=page1.php in form tag, first page Here is the problem: in page2, there is radio button(yse-no) ,if the user choose yse, then he will goes to page3 While if he choose no, the page will direct him to page4 I wrote something like this: <form action="page3.php" method="post"> <table> ..... <input name=q1 type=radio value=0>Yes <input name=q1 type=radio value=1>No <input name=id type=hidden value=$id> ..... </table> </form> In page3: if($_POST[q1]==1) header("location:page4.php"); else { .... body of page3 } So, if i'm in page3, i can see the hidden input But how if i'm in page4?? with header the hidden will be lost!!! So how could i make something like this??? Thanks Regards, Piba
  14. Hi Myth Thnaks for your replay.. i'm afraid that i dont understand exactly how to make this ??? Becasue i have already onchange in the select Here is the code of select1: <html> <head> <script src="selectuser.js"></script> </head> <body><form> Select a User: <select name="dropdown1" onchange="showUser(this.value)"> <option value="1" <? if(isset($_POST['dropdown1'])) if($_POST['dropdown1']==1) echo $_POST['dropdown1']; ?>>Peter Griffin</option> <option value="2" <? if(isset($_POST['dropdown1'])) if($_POST['dropdown1']==2) echo $_POST['dropdown1']; ?>>Lois Griffin</option> <option value="3" <? if(isset($_POST['dropdown1'])) if($_POST['dropdown1']==3) echo $_POST['dropdown1']; ?>>Glenn Quagmire</option> <option value="4" <? if(isset($_POST['dropdown1'])) if($_POST['dropdown1']==4) echo $_POST['dropdown1']; ?>>Joseph Swanson</option> </select> </form><p> <div id="txtHint"><b>User info will be listed here.</b></div> </p></body> </html> Then the js page: var xmlHttpfunction showUser(str) { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="getuser.php" url=url+"?q="+str url=url+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true) xmlHttp.send(null) }function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("txtHint").innerHTML=xmlHttp.responseText } }function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { //Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } and finally the select2: <?php $q=$_GET["q"]; $con = mysql_connect('localhost', 'peter', 'abc123'); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("ajax_demo", $con); $sql="SELECT * FROM user WHERE id = '".$q."'"; $result = mysql_query($sql); <select name=dropdown2> while($row = mysql_fetch_array($result)) { echo "<option name=info value='$row['FirstName']'>"; } echo "</table>"; mysql_close($con); ?> So, how could i save the second value in dropdown2 when the page relode?? I don't think onchange in dropdown2 will work!???!??! Could help plz
  15. Thanks alot nogray It works with me --------------- And i'm still waiting answers for my second question
×
×
  • 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.