Need Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need Help

    hello . i need some help. am ok at adding one piece of data but when it come to a full new page am still getting errors.

    i am creating a virtual lottery number page where ppl can put there own numbers in each week or woteva and other users can click on the link in the profile and see wot numbers they have got. i have managed to sort the inserting of the numbers to database . but am struggling to get the selecting bit right.
    my database table is called lottery with 7 columns
    username
    one
    two
    three
    four
    five
    six

    and thats it.

    heres the script am working on .
    can anyone help. thanks
    Attached Files
    Wapchat4u


    Topsites4u

    #2
    can u post the code up uv alredi started plz, cos that link isnt workin
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      can u post the code up uv alredi started plz, cos that link isnt workin[/b]
      erm lol i clicked on it and copied it from the link but never mind . here it is

      <?php
      header("Cache-Control: no-cache, must-revalidate");
      include("config.inc.php");
      header("Pragma: no-cache");
      header("Content-type: text/vnd.wap.wml");
      echo "<?xml version=\"1.0\"?>";
      echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
      echo "<wml>";

      echo "<card id=\"card1\" title=\"$username numbers\">";
      echo "<p align=\"center\">";
      {
      $sqlthing = mysql_query("SELECT * FROM lottery WHERE username=&#39;$username&#39;");
      $username=$username;
      $one=(mysql_result($sqlthing,0,"one"));
      $two=(mysql_result($sqlthing,0,"two"));
      $three=(mysql_result($sqlthing,0,"three"));
      $four=(mysql_result($sqlthing,0,"four"));
      $five=(mysql_result($sqlthing,0,"five"));
      $six=(mysql_result($sqlthing,0,"six"));


      echo "my virtual lottery numbers.
      ";
      echo "one: ";
      printf($one);
      echo "two: ";
      printf($two);
      echo "three: ";
      printf($three);
      echo "four: ";
      printf($four);
      echo "five: ";
      printf($five);
      echo "six: ";
      printf($six);




      }

      ?>


      [img]bar.jpg[/img]


      <?php


      echo "
      ";
      echo "<a href=\"whosonline.php?username=$username&amp;sessi on=$session\">(Who&#39;s Online)</a>";
      echo "
      ";
      echo "<a href=\"welcome.php?username=$username&amp;session= $session\">(Main Menu)</a>";

      echo "</p>";
      echo "</card>";
      echo "</wml>";
      ?>
      Wapchat4u


      Topsites4u

      Comment


        #4
        LOTTERY.PHP


        Code:
        ?php 
        header("Cache-Control: no-cache, must-revalidate");
        include("config.inc.php");
        header("Pragma: no-cache");
        header("Content-type: text/vnd.wap.wml"); 
        echo "<?xml version=\"1.0\"?>"; 
        echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; 
        echo "<wml>"; 
        
        echo "<card id=\"card1\" title=\"$username numbers\">"; 
        echo "<p align=\"center\">";
        {
        $sqlthing = mysql_query("SELECT * FROM brumi_lot WHERE username=&#39;$username&#39;");
        $username=$username;
        $first=(mysql_result($sqlthing,0,"first"));
        $second=(mysql_result($sqlthing,0,"second"));
        $third=(mysql_result($sqlthing,0,"third"));
        $fourth=(mysql_result($sqlthing,0,"fourth"));
        $fifth=(mysql_result($sqlthing,0,"fifth"));
        $sixth=(mysql_result($sqlthing,0,"sixth"));
        
        
        echo "My 6 Virtual Lottery Numbers.
        
        ";
        
        echo "First:";
        printf($first);
        echo "
        Second: ";
        printf($second);
        echo "
        Third: ";
        printf($third);
        echo "
        Fourth: ";
        printf($fourth);
        echo "
        Fifth: ";
        printf($fifth);
        echo "
        Sixth: ";
        printf($sixth);
        
        }
        
        ?>
        
        
        [img]bar.jpg[/img]
        
        
        <?php
        
        echo "
        ";
        echo "<a href=\"welcome.php?username=$username&amp;session=$session\">(Main Menu)</a>";
        
        echo "</p>"; 
        echo "</card>"; 
        echo "</wml>"; 
        ?>
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          UPDATE LOTERRY

          Code:
          <?php
          header("Cache-Control: no-cache, must-revalidate");
                  include("config.inc.php");
          header("Pragma: no-cache");
          header("Content-type: text/vnd.wap.wml");
          echo "<?xml version=\"1.0\"?>";
          echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
          echo "<wml>";
          echo "<card id=\"card1\" title=\"Lottery Numbers\">";
          echo "<p align=\"center\">";
          $Connect = mysql_connect("$server","$user","$pass");
          mysql_select_db("$dbname");
          $result=mysql_query("select * from members where username=&#39;$username&#39; and session=&#39;$session&#39;");
          $number_of_rows = mysql_num_rows($result);
          if ($number_of_rows>0)
          {
                  include("check.inc.php");
          }
          if ($ok>0)
          {
                  include("online.inc.php");
          
          $result=mysql_query("select * from brumi_lot where username= &#39;$username&#39;");
          $username=$username;
          $first=(mysql_result($sqlthing,0,"first"));
          $second=(mysql_result($sqlthing,0,"second"));
          $third=(mysql_result($sqlthing,0,"third"));
          $fourth=(mysql_result($sqlthing,0,"fourth"));
          $fifth=(mysql_result($sqlthing,0,"fifth"));
          $sixth=(mysql_result($sqlthing,0,"sixth"));
          
          echo "First:";
          echo "
          ";
          echo "<input name=\"first\" value=\"$first\" maxlength=\"2\"/>";
          echo "
          ";
          echo "Second:";
          echo "
          ";
          echo "<input name=\"second\" value=\"$second\" maxlength=\"2\" />";
          echo "
          ";
          echo "Third:";
          echo "
          ";
          echo "<input name=\"third\" value=\"$third\" maxlength=\"2\" />";
          echo "
          ";
          echo "Fourth:";
          echo "
          ";
          echo "<input name=\"fourth\" value=\"$fourth\" maxlength=\"2\" />";
          echo "
          ";
          echo "Fifth:";
          echo "
          ";
          echo "<input name=\"fifth\" value=\"fifth\" maxlength=\"2\"/>";
          echo "
          ";
          echo "Sixth:";
          echo "
          ";
          echo "<input name=\"sixth\" value=\"$sixth\" maxlength=\"2\"/>";
          echo "
          ";
          echo "<a href=\"updatedlottery.php?username=$username&amp;session=$session&amp;first=$(first)&amp;second=$(second)&amp;third=$(third)&amp;fourth=$(fourth)&amp;fifth=$(fifth)&amp;sixth=$(sixth)\">(Update Basic Profile)</a>";
          echo "
          ";
          echo "<a href=\"updateprofileoptions.php?username=$username&amp;session=$session\">(Back)</a>";
          echo "
          ";
          echo "<a href=\"welcome.php?username=$username&amp;session=$session\">(Main Menu)</a>";
          
          }
          echo "</p>";
          echo "</card>"; 
          echo "</wml>"; 
          mysql_close();
          ?>
          Want something coded email me at sales@webnwaphost.com for a prices.




          Comment


            #6
            Code:
            <?php
            header("Cache-Control: no-cache, must-revalidate");
                    include("config.inc.php");
            header("Pragma: no-cache");
            header("Content-type: text/vnd.wap.wml");
            echo "<?xml version=\"1.0\"?>";
            echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
            echo "<wml>";
            echo "<card id=\"card1\" title=\"Lottery\">";
            echo "<p align=\"center\">";
            $Connect = mysql_connect("$server","$user","$pass");
            mysql_select_db("$dbname");
            $result=mysql_query("select * from members where username=&#39;$username&#39; and session=&#39;$session&#39;");
            $number_of_rows = mysql_num_rows($result);
            if ($number_of_rows>0)
            {
                    include("check.inc.php");
            }
            if ($ok>0)
            {
                    include("online.inc.php");
            
            $result=mysql_query("select * from brumi_lot where username= &#39;$username&#39;");
            echo "Lottery Numbers Updated";
            echo "
            ";
            echo "first:  $first
            ";
            echo "second: $second
            ";
            echo "third:  $third
            ";
            echo "fourth: $fourth
            ";
            echo "fifth:  $fifth
            ";
            echo "sixth:  $sixth
            ";
            $result=mysql_query("update brumi_lot set first =&#39;$first&#39; where username=&#39;$username&#39;");
            $result=mysql_query("update brumi_lot set second =&#39;$second&#39; where username=&#39;$username&#39;");
            $result=mysql_query("update brumi_lot set third =&#39;$third &#39; where username=&#39;$username&#39;");
            $result=mysql_query("update brumi_lot set fourth =&#39;$fourth&#39; where username=&#39;$username&#39;");
            $result=mysql_query("update brumi_lot set fifth =&#39;$fifth&#39; where username=&#39;$username&#39;");
            $result=mysql_query("update brumi_lot set sixth =&#39;$sixth&#39; where username=&#39;$username&#39;");
            
            echo "<a href=\"updateprofileoptions.php?username=$username&amp;session=$session\">(Update Profile Options)</a>";
            echo "
            ";
            echo "<a href=\"welcome.php?username=$username&amp;session=$session\">(Main Menu)</a>";
            
            }
            echo "</p>";
            echo "</card>"; 
            echo "</wml>"; 
            mysql_close();
            ?>
            Want something coded email me at sales@webnwaphost.com for a prices.




            Comment


              #7
              just to let ya nw if ur sites isnt writtern in sessions then all u gota do is change session to password, and i avent made db thort u ad plus ent got time and ad charge ya a fiver
              Want something coded email me at sales@webnwaphost.com for a prices.




              Comment

              Working...
              X