HELP ON JAVA PLEASE

Hi i am new here and i have a dell 2400 pc desktop xphome addition sp 2 any way i downloaded all the new java that would be compatiable with msn's java because, i heard that msn was not going to update, so i thought i would make room get rid of old java and download the newer verson i was so excited when i finally got in at first it would be because things were blocked then it would say not initated? then address not read and so on. So i fixed my browser to work with the new java. well today i wake up and want to play online spades at iwin.com like always and it says null!! then timed out. what is nulled? what does that mean? I tried again refreshed page and same thing then said possilbly corrp file? what ? there couldnt be a corrupted file? maybe its on playsite end? i am hoping/ please help if you can i dont see the java in my right corner by clock so i can clear cache how do i get it to the clock position thanks in advance.

The site provides help to people who develop programs in the Java language. It is not a tech help desk for people who cannnot get some website to work. Try asking the people who maintain the website.

Similar Messages

  • Help with JAVA please

    I got a JAVA is unavailable error message on a site I've been to thousands of times and never had a problem.  I went through the discussions and saw an archived post dealing with a similar issue and the person was told to remove all the JAVA files then do the software update to reinstall the JAVA. I followed the advice except now that I have removed all the JAVA files my software update is not recognizing that anything needs updating.  Do you guys think that I just missed some files or what could it be?  I am not very tech-savvy so detailed answers would help me out a whole lot.
    Thanks for your time, I appreciate it a lot!

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find nothing has changed after you complete it.
    Enable guest logins and log in as Guest. For instructions, launch the System Preferences application, select “Help” from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    As Guest, launch Safari and test. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created as Guest will be deleted automatically when you log out.

  • Need Help with Java please

    Hi, I'am new to these forums just wondering if someone can help me, my problem is I have a txt file on a web server I have read in using a 'StreamConnection' and 'StringBuffer' converting the data in the txt file to String.
    what I am stuck on though is the data holds user names and passwords which I need to validate for login.. I have set up a login form with textfield for userName and Password. If the user name and password match I then need to print out the relevent data from that users field.
    Can anyone assist me with this? the fields look like this:
    1|johnsmith|js|50|40|67|77|�
    .etc. .
    cheers,
    Andrew.
    Message was edited by:
    akane_1984

    with the login/password screen I have created the user puts his name and password in:
    John Smith - js .. so what I need is when that happens and user clicks login how do I get the program to search the txt file to make sure that name & pw is correct and then output on screen the values in John smiths field. . this is full txt file:
    id|UserName|Pw|Score1|Score2|Score3|Score4|�
    1|johnsmith|js|50|40|67|77|�
    2|alansmith|as|57|81|56|66|�
    3|jackdowie|jd|57|68|32|55|�
    4|jorgcosta|jc|54|72|83|49|�
    5|johngregg|jc|77|55|89|80|�
    6|ianorr|io|46|56|71|60|�
    Message was edited by:
    akane_1984

  • Pascal to Java Please help me!

    I am truobled in creating a validation method for the user loging in....
    As I am perfect at Pascal can anyone translate the following pascla code to Java Please help me with this.
    PROGRAM USERLOGIN;
    TYPE
      USER_TYPE = RECORD
        USERNAME : STRING[15];
        PASSWORD : STRING[15];
    END;
        USFILE = FILE OF USER_TYPE;
    VAR
       USER: USER_TYPE;
       CKUSER: USER_TYPE;
       RECFILE : USFILE;
       I,J     : INTEGER;
    BEGIN
    WRITE('ENTER USERNAME:');READLN(CKUSER.USERNAME);
    WRITE('ENTER PASSWORD:');READLN(CKUSER.PASSWORD);
    FILESPEC :='USERFILE.USR';
    ASSIGN(RECFILE, FILESPEC);
    RESET(RECFILE);
      WHILE NOT EOF(RECFILE) DO
       BEGIN
         READ(RECFILE, USER);
         IF CKUSER.USERNAME = USER.USERNAME AND CKUSER.PASSWORD = USER.PASSWORD THEN
              LOGIN
        ELSE
              WRITE('USER NOT FOUND');
       END;
    END.Thank you

    Don't bother:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=539277

  • M new to this forum + new to java please help me with file handling program

    hi i want to make a file handling program where in i want to input a text file say f1 whose style is mentioned as below
    aaa...bcd
    aaabbc
    acdce
    a..dd
    abbcd
    now i want to write d out put of file f1 to file f2 but only those string entries widout any ... in them how to do that :-(( please help :((

    import java.io.*;
    import java.lang.*;
    class javcsse{
             void javsce (){
              BufferedReader in;
            PrintWriter out;
            String line;
            try
                in = new BufferedReader(new FileReader("e:\\cntcs\\n7.txt"));
                out = new PrintWriter("e:\\cntcs\\n8.txt");
               line = in.readLine();
               while(line != null)
                     if(line.contains("...") && line.contains("....")){
                         break ;                
                         else{
                               if(line.contains("cc"))
                              System.out.println(line+"\n");
                                      out.println(line);
                    line = in.readLine();
                in.close();
                out.close();
            } catch (Exception ex)
                System.err.println(ex.getMessage());
      public class javcse{
        public static void main(String[] args) {
            new javcsse();
    }hey i wrote this code yet could u tell y is it still not working :((

  • Totally New in Java - Please help!!

    Hi Dear all,
    l am totally new in Java, and l facing one problem,and really hope can get some help from yours,please!
    l need to write this program:
    The program should do the following:
    1. Input two fields: action (action: add / delete), and account number (any
    digit or character)
    2. if the action is "add" then the program adds one text line to a text
    file.
    "New account is <account number>"
    3. create the text file if it is not already exist (in c:\)
    4. When program runs again with new input values, a new line will be
    appended to the same file.
    5. if the action is "delete" then the program finds the record and removes
    the text line from the file.
    My problem is :
    l just know that l need to create the user interface first,but l don't know how to go on??
    Would you please show me some step how to solve these problem?
    Many many thanks!!
    BaoBao

    I don't know about Swing. I never use it.
    The stuff to create and manipulate files is in the java.io package.
    You'll probably want to use java.io.FileReader and java.io.FileWriter.
    Note that FileWriter has a constructor that lets you append and not overwrite.
    I'll start you off with a test.
    public class AccountListAddTest() {
      public static void main(String[] argv) {
        AccountList accts = new AccountList();
        accts.add("abcdefg12345"); // arg is a hypothetical account number
    }Write an AccountList class that'll work if you compile and run this test. After you run this test for the first time, the file should contain the string
    New account is abcdefg12345.
    This test assumes that the filename is hardcoded into the AccountList class. To keep it simple, make the add method create a new appending FileWriter each time, write, then close the writer.

  • Help with java mapping

    PI File adapter has a processing option u2018Empty-Message Handlingu2019 to ignore or Write Empty Files. In case there is no data created after mapping on target side then this option determines whether to write an empty file or not. But there is a catch to this option when it comes to using it with File Content Conversion which is described in SAP Note u2018821267u2019. It states following:
    I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory?  Example of such a payload generated from mapping is as follows:                                                           
    <?xml version="1.0" encoding="UTF-8"?>                          
    <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>
    solution :
    If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done:
    Using a Java or ABAP Mapping in order to restrict the creation of node itself during mapping. (This cannot be achieved via Message Mapping)
    Using standard adapter modules to do content conversion first and then write file. 
    can someone help with java mapping that can be used in this case?

    Hi,
        You have not mentioned the version of PI you are working in. In case you are working with PI 7.1 or above then here is the java mapping code you need to add after message mapping in the same interface mapping
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class RemoveRootNode extends AbstractTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    public void transform(TransformationInput arg0, TransformationOutput arg1)
              throws StreamTransformationException {
         // TODO Auto-generated method stub
         this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    In case you are working in PI 7.0 you can use this code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveRootNode implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    The code for PI 7.0 should also work for PI 7.1 provided you use the right jar files for compilation, but vice-versa is not true.
    Could you please let us know if this code was useful to you or not?
    Regards
    Anupam
    Edited by: anupamsap on Dec 15, 2011 9:43 AM

  • Need help in Java Script

    i Need some help in Java Script,
    am using the following code :
    <script type="text/javascript">
    var newwindow;
    function poptastic(url)
    newwindow=window.open(url,'name','height=300,width=400,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
    if (window.focus) {newwindow.focus()}
    else {newwindow.close()}
    //     if (window.focus) {newwindow.focus()}
    </script>
    In HTML,
    thWorld Environment
    Day, June 5<sup>th</sup>,2005
    Am using onmouseover event, so that when my mouse in on the link, popup is opened....and when my mouse is out of the link, the new window should b closed....
    but according to the above code, the new window is opened but have to close it manually....
    Is there any other way to close the popup when my mouse is out of the link

    Prawn,
    This is not really a good way to make friends. With the cross posting and the posting in a wrong forum anyway thing you have going.
    Please kindly take your question to an appropriate JavaScript forum.
    Have a happy day.
    Cross post from http://forum.java.sun.com/thread.jspa?messageID=3797201

  • Help - Missing JAVA??

    Hi,
    I was trying to install two apps - one from OVI Store and the other from an online paying website (iguana.com.sg) for a game.
    When I was installing the ebuddy from OVI Store, it prompts me missing attributes. and something like "invalid Jar file"./
    the error message "invalid Jar file" appears again when I tried to download a game from iguana.com.sg which it should also support my HP model N97 mini.
    I have called the nokiacare in Singapore but the problems is stil not solved.
    Please advice.
    thanks.

    MK,
    It appears that there is a typo in the page. The link should be to http://download.oracle.com/otn/java/help/ohj426_inst.zip
    Please try that. We will correct the page shortly.
    Hope this helps,
    Ryan Pollock
    Oracle Help Team

  • Combo box and Check box..help with code please?

    Here is my problem...i have a list of check boxes and according to which one is checked, i need combo boxes to populate different choices.
    as an easy example im only using 2 check boxes and two combo boxes.
    the check boxes are named Choice 1or2 with export values of 1 and 2
    the Combo Boxes are named List A and List B..
    both containing options that say you checked box 1 and you checked box 2
    any help would be greatly appreciated

    Implode wrote:
    "Help with code please."
    In the future, please use a meaningful subject. Given that you're posting here, it's kind of a given that you're looking for help with the code. The whole point of the subject is to give people a high level idea of what KIND of help with what KIND of code you need, so they can decide if they're interested and qualified to help.
    Exception in thread "main" java.lang.NumberFormatException: For input string: "fgg"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at assignment1.Game.Start(Game.java:120)
         at assignment1.RunGame.main(RunGame.java:18)This error message is telling you exactly what's wrong. At line 120 of Game.java, in the Start method (which should start with lowercase "s" to follow conventions, by the way), you're calling Integer.parseInt, but "fgg" is not a valid int.

  • HELP ON java.lang.String,int

    Im very new to java.please help!!!
    im having this error after compiling this:-
    public boolean setBookname(String newName)
              if (newName >0)
                   BookName = newName;
              else
                   return false;
    A:\Book.java:30: operator > cannot be applied to java.lang.String,int
              if (newName >0)
    ^
    1 error
    Process completed.
    thank u!

    The OP should read about IllegalArgumentException.Indeed. And a few other things as well...
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/learning/new2java/index.html
    http://javaalmanac.com
    http://www.jguru.com
    http://www.javaranch.com
    Bruce Eckel's Thinking in Java
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java

  • Help with message please:  Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line

    I would really appreciate some help with my search & results page that is now throwing up the following error:
    Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line (the line number refers to the following code:
    mysql_free_result($RSsearchforsale);
    mysql_free_result($RsSearchForSale2);
    mysql_free_result($RsSearchForSale3);
    mysql_free_result($RsSearchForSale4);
    I am new to php and am setting up a dynamic site in Dreamweaver (thanks to the Missing Manual – very helpful). I apologise in advanced for my lengthy description of the problem (perhaps get yourself a drink before continuing!)
    I have a Search page with 4 list menus where the user can select an option from ANY or ALL of the menus, if a menu is not selected the value posted to the results page will be 'zzz'.
    On the results page I have 4 recordsets, all getting the correct results, only one recordset is required to run depending on how many of the menus from the search page have been selected and a test is run before executing the sql using a SWITCH statement checking how many of the menus had passed the 'zzz' values from the Search page if you see what I mean. The results page  has Repeating Regions, Recordset Paging and Display Record Count. The exact result that I require are generated by this method.
    THE PROBLEM, when a user makes a selection the first page of 10 results is fine, but the error message above is shown at the bottom of the page, AND when the user clicks NEXT to go to the next page of results THERE ARE NO RESULTS.
    This is exactly what happens depending on how many menus selected and which recordset is used:
    4 menus selected from Search: runs RSsearchforsale, results correct but 3 error messages on 1st page relating to mysql_free_result($RsSearchForSale2),mysql_free_result($RsSearchForSale3), & mysql_free_result($RsSearchForSale4). The display record count shows correct results found. NEXT page is empty of results and still shows the correct display record count as if it should be displaying the records, also has the same 3 error messages.
    3 menus selected from Search:  runs RsSearchForSale2, results correct but 3 error messages on 1st page relating to mysql_free_result($RSsearchforsale),mysql_free_result($RsSearchForSale3), & mysql_free_result($RsSearchForSale4). The display record count shows correct number of results. NEXT page shows results from the  DEFAULT setting of the recordset and the Display record count reflects this new set of results. Also still shows the 3 mysql_free_results for RsSearchForSale2, 3 and 4.
    2 menus selected from Search: runs   RsSearchForSale3, results correct but 2 error messages on 1st page relating to  mysql_free_result($RSsearchforsale) & mysql_free_result (RsSearchForSale4). The display record count is correct. NEXT page does exactly the same as described in above 3 menus selected.
    1 menu selected from search: runs RsSearchForSale4, results correct but 1 error meaasge on 1st page, mysql_free_result($RSsearchforsale). Display record count is correct and again when NEXT page is selected does as described in above where 2 or 3 menus selected.
    If you have gotten this far without falling asleep then thank you and well done! I have pasted my code below and I know its a lot to ask but please please can you give me an idea as to where or why I have gone wrong. I felt I was so close at perfecting this search and have been working on it for weeks now. I feel sure the problem is because I have 4 recordsets on the page but I could find no other way to get the exact results I wanted from the menus.
    Looking forward to any help.
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RSsearchforsale = 10;
    $pageNum_RSsearchforsale = 0;
    if (isset($_GET['pageNum_RSsearchforsale'])) {
      $pageNum_RSsearchforsale = $_GET['pageNum_RSsearchforsale'];
    $startRow_RSsearchforsale = $pageNum_RSsearchforsale * $maxRows_RSsearchforsale;
    $varloc_RSsearchforsale = "mpl";
    if (isset($_POST['location'])) {
      $varloc_RSsearchforsale = $_POST['location'];
    $vartype_RSsearchforsale = "vil";
    if (isset($_POST['type'])) {
      $vartype_RSsearchforsale = $_POST['type'];
    $varprice_RSsearchforsale = "pr9";
    if (isset($_POST['price'])) {
      $varprice_RSsearchforsale = $_POST['price'];
    $varbed_RSsearchforsale = "b5";
    if (isset($_POST['beds'])) {
      $varbed_RSsearchforsale = $_POST['beds'];
    switch (true) {
    case ($varloc_RSsearchforsale != 'zzz' && $vartype_RSsearchforsale != 'zzz' && $varprice_RSsearchforsale != 'zzz' && $varbed_RSsearchforsale != 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RSsearchforsale = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE location=%s AND price=%s AND type=%s AND beds=%s ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc_RSsearchforsale, "text"),GetSQLValueString($varprice_RSsearchforsale, "text"),GetSQLValueString($vartype_RSsearchforsale, "text"),GetSQLValueString($varbed_RSsearchforsale, "text"));
    $query_limit_RSsearchforsale = sprintf("%s LIMIT %d, %d", $query_RSsearchforsale, $startRow_RSsearchforsale, $maxRows_RSsearchforsale);
    $RSsearchforsale = mysql_query($query_limit_RSsearchforsale, $propertypages) or die(mysql_error());
    $row_RSsearchforsale = mysql_fetch_assoc($RSsearchforsale);
    if (isset($_GET['totalRows_RSsearchforsale'])) {
      $totalRows_RSsearchforsale = $_GET['totalRows_RSsearchforsale'];
    } else {
      $all_RSsearchforsale = mysql_query($query_RSsearchforsale);
      $totalRows_RSsearchforsale = mysql_num_rows($all_RSsearchforsale);
    $totalPages_RSsearchforsale = ceil($totalRows_RSsearchforsale/$maxRows_RSsearchforsale)-1;
    $queryString_RSsearchforsale = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RSsearchforsale") == false &&
            stristr($param, "totalRows_RSsearchforsale") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RSsearchforsale = "&" . htmlentities(implode("&", $newParams));
    $queryString_RSsearchforsale = sprintf("&totalRows_RSsearchforsale=%d%s", $totalRows_RSsearchforsale, $queryString_RSsearchforsale); } ?>
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RsSearchForSale2 = 10;
    $pageNum_RsSearchForSale2 = 0;
    if (isset($_GET['pageNum_RsSearchForSale2'])) {
      $pageNum_RsSearchForSale2 = $_GET['pageNum_RsSearchForSale2'];
    $startRow_RsSearchForSale2 = $pageNum_RsSearchForSale2 * $maxRows_RsSearchForSale2;
    $varloc2_RsSearchForSale2 = "mpl";
    if (isset($_POST['location'])) {
      $varloc2_RsSearchForSale2 = $_POST['location'];
    $varprice2_RsSearchForSale2 = "p9";
    if (isset($_POST['price'])) {
      $varprice2_RsSearchForSale2 = $_POST['price'];
    $vartype2_RsSearchForSale2 = "vil";
    if (isset($_POST['type'])) {
      $vartype2_RsSearchForSale2 = $_POST['type'];
    $varbed2_RsSearchForSale2 = "b5";
    if (isset($_POST['beds'])) {
      $varbed2_RsSearchForSale2 = $_POST['beds'];
    switch (true) {
    case ($varloc2_RsSearchForSale2 == 'zzz'):
    case ($varprice2_RsSearchForSale2 == 'zzz'):
    case ($vartype2_RsSearchForSale2 == 'zzz'):
    case ($varbed2_RsSearchForSale2 == 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RsSearchForSale2 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE (location=%s AND price=%s AND type=%s) OR (location=%s AND price=%s AND beds=%s) OR (location=%s AND type=%s AND beds=%s) OR (price=%s AND type=%s AND beds=%s) ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"),GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"));
    $query_limit_RsSearchForSale2 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale2, $startRow_RsSearchForSale2, $maxRows_RsSearchForSale2);
    $RsSearchForSale2 = mysql_query($query_limit_RsSearchForSale2, $propertypages) or die(mysql_error());
    $row_RsSearchForSale2 = mysql_fetch_assoc($RsSearchForSale2);
    if (isset($_GET['totalRows_RsSearchForSale2'])) {
      $totalRows_RsSearchForSale2 = $_GET['totalRows_RsSearchForSale2'];
    } else {
      $all_RsSearchForSale2 = mysql_query($query_RsSearchForSale2);
      $totalRows_RsSearchForSale2 = mysql_num_rows($all_RsSearchForSale2);
    $totalPages_RsSearchForSale2 = ceil($totalRows_RsSearchForSale2/$maxRows_RsSearchForSale2)-1;
    $queryString_RsSearchForSale2 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RsSearchForSale2") == false &&
            stristr($param, "totalRows_RsSearchForSale2") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RsSearchForSale2 = "&" . htmlentities(implode("&", $newParams));
    $queryString_RsSearchForSale2 = sprintf("&totalRows_RsSearchForSale2=%d%s", $totalRows_RsSearchForSale2, $queryString_RsSearchForSale2);
    }?>
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RsSearchForSale3 = 10;
    $pageNum_RsSearchForSale3 = 0;
    if (isset($_GET['pageNum_RsSearchForSale3'])) {
      $pageNum_RsSearchForSale3 = $_GET['pageNum_RsSearchForSale3'];
    $startRow_RsSearchForSale3 = $pageNum_RsSearchForSale3 * $maxRows_RsSearchForSale3;
    $varloc3_RsSearchForSale3 = "mpl";
    if (isset($_POST['location'])) {
      $varloc3_RsSearchForSale3 = $_POST['location'];
    $varprice3_RsSearchForSale3 = "p9";
    if (isset($_POST['price'])) {
      $varprice3_RsSearchForSale3 = $_POST['price'];
    $vartype3_RsSearchForSale3 = "vil";
    if (isset($_POST['type'])) {
      $vartype3_RsSearchForSale3 = $_POST['type'];
    $varbed3_RsSearchForSale3 = "b5";
    if (isset($_POST['beds'])) {
      $varbed3_RsSearchForSale3 = $_POST['beds'];
    switch (true) {
    case ($varloc3_RsSearchForSale3 == 'zzz' && $varprice3_RsSearchForSale3 == 'zzz'):
    case ($varprice3_RsSearchForSale3 == 'zzz' && $vartype3_RsSearchForSale3 == 'zzz'):
    case ($vartype3_RsSearchForSale3 == 'zzz' && $varbed3_RsSearchForSale3 == 'zzz' ):
    case ($varbed3_RsSearchForSale3 == 'zzz' && $varloc3_RsSearchForSale3 == 'zzz'):
    case ($varloc3_RsSearchForSale3 == 'zzz' && $vartype3_RsSearchForSale3 == 'zzz'):
    case ($varprice3_RsSearchForSale3 == 'zzz' && $varbed3_RsSearchForSale3 == 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RsSearchForSale3 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE (location=%s AND price=%s) OR (location=%s AND  type=%s) OR (location=%s AND beds=%s) OR ( type=%s AND beds=%s) OR (price=%s AND type=%s) OR (price=%s AND beds=%s) ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"));
    $query_limit_RsSearchForSale3 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale3, $startRow_RsSearchForSale3, $maxRows_RsSearchForSale3);
    $RsSearchForSale3 = mysql_query($query_limit_RsSearchForSale3, $propertypages) or die(mysql_error());
    $row_RsSearchForSale3 = mysql_fetch_assoc($RsSearchForSale3);
    if (isset($_GET['totalRows_RsSearchForSale3'])) {
      $totalRows_RsSearchForSale3 = $_GET['totalRows_RsSearchForSale3'];
    } else {
      $all_RsSearchForSale3 = mysql_query($query_RsSearchForSale3);
      $totalRows_RsSearchForSale3 = mysql_num_rows($all_RsSearchForSale3);
    $totalPages_RsSearchForSale3 = ceil($totalRows_RsSearchForSale3/$maxRows_RsSearchForSale3)-1;
    $queryString_RsSearchForSale3 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RsSearchForSale3") == false &&
            stristr($param, "totalRows_RsSearchForSale3") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RsSearchForSale3 = "&" . htmlentities(implode("&", $newParams));
    $queryString_RsSearchForSale3 = sprintf("&totalRows_RsSearchForSale3=%d%s", $totalRows_RsSearchForSale3, $queryString_RsSearchForSale3);
    } ?>
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RsSearchForSale4 = 10;
    $pageNum_RsSearchForSale4 = 0;
    if (isset($_GET['pageNum_RsSearchForSale4'])) {
      $pageNum_RsSearchForSale4 = $_GET['pageNum_RsSearchForSale4'];
    $startRow_RsSearchForSale4 = $pageNum_RsSearchForSale4 * $maxRows_RsSearchForSale4;
    $varloc4_RsSearchForSale4 = "mpl";
    if (isset($_POST['location'])) {
      $varloc4_RsSearchForSale4 = $_POST['location'];
    $vartype4_RsSearchForSale4 = "vil";
    if (isset($_POST['type'])) {
      $vartype4_RsSearchForSale4 = $_POST['type'];
    $varprice4_RsSearchForSale4 = "p9";
    if (isset($_POST['price'])) {
      $varprice4_RsSearchForSale4 = $_POST['price'];
    $varbed4_RsSearchForSale4 = "b5";
    if (isset($_POST['beds'])) {
      $varbed4_RsSearchForSale4 = $_POST['beds'];
    switch (true) {
    case ($varloc4_RsSearchForSale4 == 'zzz' && $vartype4_RsSearchForSale4 =='zzz' && $varprice4_RsSearchForSale4 == 'zzz'):
    case ($varloc4_RsSearchForSale4 == 'zzz' && $varprice4_RsSearchForSale4 =='zzz' && $varbed4_RsSearchForSale4 == 'zzz'):
    case ($varloc4_RsSearchForSale4 == 'zzz' && $varbed4_RsSearchForSale4 =='zzz' && $vartype4_RsSearchForSale4 == 'zzz'):
    case ($varbed4_RsSearchForSale4 == 'zzz' && $vartype4_RsSearchForSale4 =='zzz' && $varprice4_RsSearchForSale4 == 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RsSearchForSale4 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE location=%s OR price=%s OR type=%s OR beds=%s ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc4_RsSearchForSale4, "text"),GetSQLValueString($varprice4_RsSearchForSale4, "text"),GetSQLValueString($vartype4_RsSearchForSale4, "text"),GetSQLValueString($varbed4_RsSearchForSale4, "text"));
    $query_limit_RsSearchForSale4 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale4, $startRow_RsSearchForSale4, $maxRows_RsSearchForSale4);
    $RsSearchForSale4 = mysql_query($query_limit_RsSearchForSale4, $propertypages) or die(mysql_error());
    $row_RsSearchForSale4 = mysql_fetch_assoc($RsSearchForSale4);
    if (isset($_GET['totalRows_RsSearchForSale4'])) {
      $totalRows_RsSearchForSale4 = $_GET['totalRows_RsSearchForSale4'];
    } else {
      $all_RsSearchForSale4 = mysql_query($query_RsSearchForSale4);
      $totalRows_RsSearchForSale4 = mysql_num_rows($all_RsSearchForSale4);
    $totalPages_RsSearchForSale4 = ceil($totalRows_RsSearchForSale4/$maxRows_RsSearchForSale4)-1;
    $queryString_RsSearchForSale4 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RsSearchForSale4") == false &&
            stristr($param, "totalRows_RsSearchForSale4") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RsSearchForSale4 = "&" . htmlentities(implode("&", $newParams));
    $queryString_RsSearchForSale4 = sprintf("&totalRows_RsSearchForSale4=%d%s", $totalRows_RsSearchForSale4, $queryString_RsSearchForSale4);
    }?>

    Hi David,
    Thank you for your reply and patience, we are getting closer in spite of me!
    Of course i needed to change the name of the recordset, i did that the first time i did it (when i got the error), the when i re did it i forgot, in my defense i was also trying to get a full understanding of the code using the W3Schools php reference and writing by the side of the code on a piece of paper what it meant in English.
    Anyway after re doing the code correctly it still displayed all the records of my database but i realised that was because i was POSTING from the search form and when i changed it to the GET method I now get results when all 4  list menus are selected from and the paging works. After reading about the POST / GET method i chose the POST option, is the GET method a better option in my circumstance?
    On my site now if the user selects from 1,2 or 3 of the menus rather than selecting the relevant records it displays the NO RESULT page, I would like my users to be able to select from all of the menus or ANY combination of the menus and find exact results for their search, for example if they only select a location and a price i want it display all records that match that location and price with any number of bedrooms and any Type of property: Perhaps this is due to how my list menus are set up, for each menu the first Item label is Location (or Beds or Type or Price) and the value i have left blank which i believe means that it will use the item label as the value, the second Item label for all menus is Any and again the value has been left blank. All other item labels have values relevant to database records.  
    I do look forward to your reply and cannot thank you enough for following this through with me, please continue to bare with me just a little more,
    best regards
    Tessimon
    Date: Wed, 11 Nov 2009 06:56:24 -0700
    From: [email protected]
    To: [email protected]
    Subject: Help with message please:  Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line
    You're not adding the WHERE clause to the SQL query. My example code uses $query_search. You need to change that variable to match the name of your recordset, i.e. $query_RSsearchforsale.
    Moreover, the WHERE clause needs to go before ORDER BY.
    $query_RSsearchforsale = "SELECT trueprice,`desc`, `propid`, `bathrooms`, `location`, `type`, `price`, `beds`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid ";
    // Set a flag to indicate whether the query has a WHERE clause
    $where = false;
    // Loop through the associatiave array of expected search values
    foreach ($expected as $var => $type) {
      if (isset($_GET[$var])) {
        $value = trim(urldecode($_GET[$var]));
        if (!empty($value)) {
          // Check if the value begins with > or <
          // If so, use it as the operator, and extract the value
          if ($value[0] == '>' || $value[0] == '<') {
            $operator = $value[0];
            $value = ltrim(substr($value, 1));
          } elseif (strtolower($type) != 'like') {
            $operator = '=';
          // Check if the WHERE clause has been added yet
          if ($where) {
            $query_RSsearchforsale .= ' AND ';
          } else {
            $query_RSsearchforsale .= ' WHERE ';
            $where = true;
          // Build the SQL query using the right operator and data type
          $type = strtolower($type);
          switch($type) {
            case 'like':
              $query_RSsearchforsale .= "`$var` LIKE " . GetSQLValueString('%' .
    $value . '%', "text");
              break;
            case 'int':
            case 'double':
            case 'date':
              $query_RSsearchforsale .= "`$var` $operator " .
    GetSQLValueString($value, "$type");
              break;
            default:
            $query_RSsearchforsale .= "`$var` = " . GetSQLValueString($value,
    "$type");
    $query_RSsearchforsale .= ' ORDER BY detailstable.trueprice ASC';
    >

  • After last update itunes wouldn't open on my laptop (windows 7).  i uninstalled it but now it won't re-install but just takes me to 'thank you' page - help to reinstall please...

    Recently i updated my the itunes but after doing so although it would open on my computer for a bit, it wouldn't recognise it  - ie, syncing phone or I could open the program but when trying to redeem a gift voucher it didn't recognise the program on my PC and suggested i install it!.  Today it wouldn't open at all so I tried to  uninstalled it so i could reinstall it from scratch but now it won't re-install but just takes me to 'thank you' page.
    - help to reinstall please...

    Hey Elaine07!
    I have an article here that can help you with that issue. This article will help you make sure you have uninstalled iTunes correctly and help you troubleshoot the launch issues you are seeing:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1717
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Please help me! My MacBook was stolen along with an external hard drive that had all my photos of my children on them. I hadn't backed to iCloud or backed anywhere else. I am distraught. No find my mac either...help...please...

    Please help me! My MacBook was stolen along with an external hard drive that had all my photos of my children on them. I hadn't backed to iCloud or backed anywhere else. I am distraught. No find my mac either...help...please... Some programmes are still running like drop of and Skype... Is it all over?!?

    Yes, the Old Master file has a folder for each year where I find all photos from that specific year. I am attaching a screen shot of the file.
    In the meantime i have managed to download all photos (it did not download any video files though in mpg, avi, 3gp, m4v,mp4 and mov format) to a new iphoto library. Unfortunately the photos are quite mixed and often doubled up. I ma considering to purchase iphoto library which checks all duplicates in iphoto. this will save me a lot of time. What do you think?

  • HT1338 I have os 10.5.8 software on my mac and I need to update the software on my mac so I can update my iphone 4s, every time I try to update my mac with the 6.0 it says it doesn't need any updates, but my mac still has 10.5.8.... any help??  Please...

    I have os 10.5.8 software on my mac and I need to update the software on my mac so I can update my iphone 4s, every time I try to update my mac with the 6.0 it says it doesn't need any updates, but my mac still has 10.5.8.... any help??  Please...

    You must first buy Snow Leopard from Apple: 800-MY-APPLE (in the US)
    Make sure your system meets Snow Leopard's requirements:
    Mac OS X 10.6 "Snow Leopard" System Requirements
    To install Snow Leopard for the first time, you must have a Mac with:
    An Intel processor
    An internal or external DVD drive, or DVD or CD Sharing
    At least 1 GB of RAM (additional RAM is recommended)
    A built-in display or a display connected to an Apple-supplied video card supported by your computer
    At least 5 GB of disk space available, or 7 GB of disk space if you install the developer tools

Maybe you are looking for

  • Weird character filter

    I used to code in RedHat. Something happened (something nasty) and I changed to Mandrake to give it a try. Among my source file I had a Class with a method that filtered characters, some usual characters (dollar, punctuation) and some not so usual (y

  • Screen dimming vs. "lock"

    Is there any way to get the iPod Touch to automatically dim the screen after a short period of non-use without going into "locked mode"? I would like to have it conserve battery power by fully dimming the screen but not have to press the home key, sl

  • Struts 2 external js file

    hey, I have a problem in invoking methods in an external js file. I'm using struts 2 in eclipse. the jsp page is in WEB-INF\jsp\view and the js file is in WEB-INF\jsp\view\js\ Following is my code; <%@ page contentType="text/html; charset=utf-8" lang

  • How to print PCL on Solaris

    I'm trying to install a new HP Laserjet 3200 on Solaris 8. How do I do that so that it understands PCL and can print graphics, etc.

  • WAAS recovery CD (v 4.0.17.14) download help?

    I need WAAS recovery CD (v 4.0.17.14) asap, but I don't have access privileges for downloading. We are in lack of time (Reseller would send in a few days and that's late). Any help? http://tools.cisco.com/search/display?url=http%3A%2F%2Fwww.cisco.com