Jump to content

web designer

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

web designer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [color=brown]hello.. I need someone's help  :-[ please ! I have a map that has many blue dots... and I have their latitude and longitude in my database.. I can easily do a search and pick few dots from my database.. [b]1st step:[/b] I need these few dots to be coloured by red in the result page that shows the map with all of the blue dots + new red dots ( where they should be above some of the blue dots ) [b]2nd step:[/b] I should have the user able to click on these red dots.. so he can after that have all the stuff in the database that are related to this specific dot.. [b]3rd step:[/b] the map is toooo big.. so I should have the user to be able to zoom in (while he is clicking around the red dot) but as in step 2 .. if he clicked on the dot.. results should be displayed.. how can i do these steps  ::)?? heeelp  ??? please  :) web designer[/color]
  2. [color=brown] Oh :( I think what I have written above is wrong  :-\ please can any one help ?  :-[ I don't know why is the session not working !! [/color]
  3. [color=brown] as I'm taking info from my database and showing it in many pages.. is it right to do this.. for passing variables to the another page ? [/color] [code] <?php $num=1;     for($i=1;$i<$numPages;$i++) {     if($num==$pageNo) { $font="<b>"; $unfont="</b>"; } else { $font=""; $unfont=""; } echo "<a href='query1.php?page=$num&tennis=$_SESSION['tennis']&basketball=$_SESSION['basketball']'>$font $num $unfont</a>&nbsp";     $num = $num + 1; } ?> [/code] [color=brown] My question is mostly for this part ( sessions ) [/color] [code] <?php echo "<a href='query1.php?page=$num&tennis=$_SESSION['tennis']&basketball=$_SESSION['basketball']'>$font $num $unfont</a>&nbsp"; ?> [/code]
  4. [color=brown] but still ! .. should I write these lines of code in my query.php ?? [/color] [code] <?php ............etc $ostracodes = $_SESSION['ostracodes']; $indetermine = $_SESSION['indetermine']; $preQuery="select * from Macrofossiles where (ostracodes = '$ostracodes') || (indetermine = '$indetermine')"; ............etc ?> [/code]
  5. [color=brown][b]I figured out that I should write these[/b][/color] [code] <?php if($_POST['ostracodes'] == 'x') $_SESSION['ostracodes'] = x; if($_POST['indetermine'] == 'x') $_SESSION['indetermine'] = x; ?> [/code] [color=brown][b]in my query.php  not  my form.php[/b][/color] I wrote them in this way: [code] <?php if(isset ($_POST['ostracodes']))       {$_SESSION['ostracodes'] = x;} if(isset ($_POST['indetermine']))       {$_SESSION['indetermine'] = x;} ?> [/code]
  6. [color=brown] Okay  :) I wrote in my form.php [/color] [code] ............etc <input name="ostracodes" type="checkbox" value="x">Ostracodes <br /> <input name="indéterminé" type="checkbox" value="x">Indéterminé <br /> <br /> <input name="reset" type="reset" value="Reset"/> <input name="submit" type="submit" value="Submit"/> </form> <?php if($_POST['ostracodes'] == 'x') $_SESSION['ostracodes'] = x; if($_POST['indetermine'] == 'x') $_SESSION['indetermine'] = x; ?> ............etc [/code] [color=brown]now ! .. in my query.php should I do this: [/color] [code] <?php ............etc $ostracodes = $_SESSION['ostracodes']; $indetermine = $_SESSION['indetermine']; $preQuery="select * from Macrofossiles where (ostracodes = '$ostracodes') || (indetermine = '$indetermine')"; ............etc ?> [/code]
  7. [color=brown] Oh I really appreciate your help.. thanks alot.. now.. what about the [u]variables[/u] !! ? [b]can I do this:[/b] form.php[/color] [code] ...etc <input name="<?php $ostracodes='ostracodes'; ?>" type="checkbox" value="x">Ostracodes <input name="<?php $indetermine='indetermine'; ?>" type="checkbox" value="x">Indetermine ...etc </form> <?php $_SESSION['ostracodes'] = $ostracodes; $_SESSION['indetermine'] = $indetermine; ?> [/code]
  8. [color=brown]I just started adding the session stuff.. ;D now.. I have this code in both files.. the form and the query.. [b]<?php session_start(); ..............................etc[/b] but I got an error.. in my two files.. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Documents and Settings\Work Station\Desktop\wamp\www\WebSite\forms\form1.php:[b]9[/b]) in C:\Documents and Settings\Work Station\Desktop\wamp\www\WebSite\forms\form1.php on line [b]61[/b] on line 9 there is a usual meta tag on line 61 there is session_start(); so ! what is the problem !![/color]
  9. [color=brown] Hello  :) I have two files.. form.php  -  query.php [b]form.php[/b] [/color] [code] <form action="http://localhost/queries/query.php" method="post" name="form"> Searching for players which play these games... <br /> <br /> <input name="football" type="checkbox" value="x">Football <br /> <input name="basketball" type="checkbox" value="x">Basketball <br /> <br /> <input name="reset" type="reset" value="Reset"/> <input name="submit" type="submit" value="Submit"/> </form> [/code] [color=brown] [b]query.php[/b] [/color] [code] <?php $page=$_GET["page"]; if(!isset($page)) { $page=1; $pageNo = $page +1; } $pageNo = $page; echo "Page Number:&nbsp<b>$pageNo</b>"; $page=$page-1; //connecting to my database.. and for sure it's working..(hidden for now) //.... //.... //.... $football = $_POST['football']; $basketball = $_POST['basketball']; $preQuery="select * from Macrofossiles where (football = '$football') || (basketball= '$basketball')"; $preResult=mysql_query($preQuery,$server) or die("Could not execute preQuery..."); $numRows=mysql_num_rows($preResult); $numPages=$numRows/1; $query = "select * from Macrofossiles where (football = '$football') || (basketball= '$basketball') limit $page, 1"; $result = mysql_query($query,$server) or die("Could not execute query..."); while($row = mysql_fetch_array($result)) {     echo '<table bordercolor="#CC7722" align="center">' . "<tr><td>Player Number:</td><td>{$row['Player_No']}</td></tr>" . "<tr><td>Hockey:</td><td>{$row['Hockey']}</td></tr>" . "<tr><td>Volleyball:</td><td>{$row['volleyball']}</td></tr>" . "<tr><td>Tennis:</td><td>{$row['tennis']}</td></tr>" . "<tr><td>Football:</td><td>{$row['football']}</td></tr>" .       "<tr><td>Basketball:</td><td>{$row['Basketball']}</td></tr>" . "</table>"; }     echo "<b>Page:</b>&nbsp;&nbsp";     $num=1;     for($i=1;$i<$numPages;$i++)   { if($num==$pageNo) { $font="<b>"; $unfont="</b>"; } else { $font=""; $unfont=""; }     echo "<a href='query.php?page=$num'>$font $num $unfont</a>&nbsp";     $num = $num + 1;   } mysql_close($server); ?> [/code] [color=brown] [b]Database:[/b] |  Player_No  |  Hockey  |  Volleyball  |  Tennis  |  Football  |  basketball  | |      1        |      x      |      x      |            |      x      |                | |      2        |              |      x      |      x      |              |        x        | |      3        |      x      |              |      x      |      x      |                | |      4        |              |      x      |      x      |              |        x        | |      5        |      x      |      x      |            |      x      |        x        | |      6        |      x      |      x      |            |      x      |                | |      7        |              |      x      |      x      |              |        x        | |      8        |      x      |              |      x      |      x      |                | |      9        |              |      x      |      x      |              |        x        | . . . etc I hope someone can help.. Oops.. I didn't tell you guys what is the problem I'm sufferring from in these codes.. here is it.. when I check the two checkboxes... and click submit.. the query.php open and everything seems okey.. the results are perfect.. and exact.. but !! .. when I click page number 2 or 3 or any number after the first click, everything is changed !! .. it geves me the result of this query "select * from Macrofossiles where (football = '') || (basketball= '')" I mean it gives me the result when football is empty and basketball is empty.. that means this query-->"select * from Macrofossiles" all the resutls will show up ..  :( it seems to me that I need to write sessions.. but how that will ! .. what should I write and where in my code !! any help !  ::)  :D[/color]
  10. [color=brown] guys.. no one answer me  :( ... I think what I need is a session.. but how can I implement it to my code.. what should I write.. and where in my code ??  ::)[/color]
  11. [color=brown] Everything is fine..  ;D with connecting to the servers throw my computer.. _____________________________________________________________________ but I got another problem !.. I have two files.. form.php  -  query.php [b]form.php[/b] [/color] [code] <form action="http://localhost/queries/query.php" method="post" name="form"> Searching for players which play these games... <br /> <br /> <input name="football" type="checkbox" value="x">Football <br /> <input name="basketball" type="checkbox" value="x">Basketball <br /> <br /> <input name="reset" type="reset" value="Reset"/> <input name="submit" type="submit" value="Submit"/> </form> [/code] [color=brown] [b]query.php[/b] [/color] [code] <?php $page=$_GET["page"]; if(!isset($page)) { $page=1; $pageNo = $page +1; } $pageNo = $page; echo "Page Number:&nbsp<b>$pageNo</b>"; $page=$page-1; //connecting to my database.. and for sure it's working..(hidden for now) //.... //.... //.... $football = $_POST['football']; $basketball = $_POST['basketball']; $preQuery="select * from Macrofossiles where (football = '$football') || (basketball= '$basketball')"; $preResult=mysql_query($preQuery,$server) or die("Could not execute preQuery..."); $numRows=mysql_num_rows($preResult); $numPages=$numRows/1; $query = "select * from Macrofossiles where (football = '$football') || (basketball= '$basketball') limit $page, 1"; $result = mysql_query($query,$server) or die("Could not execute query..."); while($row = mysql_fetch_array($result)) {     echo '<table bordercolor="#CC7722" align="center">' . "<tr><td>Player Number:</td><td>{$row['Player_No']}</td></tr>" . "<tr><td>Hockey:</td><td>{$row['Hockey']}</td></tr>" . "<tr><td>Volleyball:</td><td>{$row['volleyball']}</td></tr>" . "<tr><td>Tennis:</td><td>{$row['tennis']}</td></tr>" . "<tr><td>Football:</td><td>{$row['football']}</td></tr>" .        "<tr><td>Basketball:</td><td>{$row['Basketball']}</td></tr>" . "</table>"; }        echo "<b>Page:</b>&nbsp;&nbsp";        $num=1;        for($i=1;$i<$numPages;$i++)    { if($num==$pageNo) { $font="<b>"; $unfont="</b>"; } else { $font=""; $unfont=""; }     echo "<a href='query.php?page=$num'>$font $num $unfont</a>&nbsp";     $num = $num + 1;   } mysql_close($server); ?> [/code] [color=brown] [b]Database:[/b] |  Player_No  |  Hockey  |  Volleyball  |  Tennis  |  Football  |  basketball  | |       1        |       x      |       x       |             |      x       |                 | |       2        |              |       x       |      x      |              |        x        | |       3        |       x      |               |      x      |      x       |                 | |       4        |              |       x       |      x      |              |        x        | |       5        |       x      |       x       |             |      x       |        x        | |       6        |       x      |       x       |             |      x       |                 | |       7        |              |       x       |      x      |              |        x        | |       8        |       x      |               |      x      |      x       |                 | |       9        |              |       x       |      x      |              |        x        | . . . etc I hope someone can help.. Oops.. I didn't tell you guys what is the problem I'm sufferring from in these codes.. here is it.. when I check the two checkboxes... and click submit.. the query.php open and everything seems okey.. the results are perfect.. and exact.. but !! .. when I click number 2 or 3 or any number after the first click, everything is changed !! .. it geves me the result of this query "select * from Macrofossiles where (football = '') || (basketball= '')" I mean it gives me the result when football is empty and basketball is empty.. that means this query-->"select * from Macrofossiles" all the resutls will show up ..  :( any help !  ::)  :D[/color]
  12. [quote author=cmgmyr link=topic=99676.msg393135#msg393135 date=1152285657] Are you behind a router, or are you just directly connected to a modem? [/quote] [size=11pt][color=brown]hmmm  ::) it's Modem.. wireless !  :-X :) --------------------------------------------------------------- Thanks Ummzee.. I'll look at your post, too.[/color][/size]
  13. [size=11pt][color=brown] O.oh  :o ... Static ip address !!!  :-\ can you please provide for me  :) .. some steps I should follow to get the static ip address set on my PC  ??? !! please  ;D , Sara[/color][/size]
  14. [size=11pt][color=brown] Thanks Chris.. I appreciate that..  :) I hope you are not going to be tired from the huge number of questions.. lol  ;D just  8) kidding :D Ooops :o, here is the first problem ! ..  :-[ assuming that I have no server.. no domain.. just trying to test the php files using dreamweaver.. what should I fill these empty boxes  ::) ! in the picture below.. !?  :-\ [/color][/size] [attachment deleted by admin]
  15. [size=11pt][color=brown] Thank you very much Chris.. That was helpful..  :D I'll try my best.. and if I have any questions, I'll get back to this lovely forum..  ;D --------------------------- if anyone have any more detials/information wants to add.. please do so..  :) --------------------------- Thanks again, Sara[/color][/size]
×
×
  • 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.