SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Smolf3d's Avatar
    Join Date
    Aug 2004
    Location
    russia
    Posts
    232
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    multiple page , need help

    To me necessary help in till to make my leaf, on this moment mine it goes here is so
    Code:
    someрage.рhр?сategory=0
    and I want him to continue as for example
    Code:
    someрage.рhр?сategory=0&uрload=1
    , help please.

    And all of this in one page .

    this is my code .

    PHP Code:
    <?PHP 
        
    if(isset($HTTP_POST_VARS['category'])) 

        
    $smolf3d['category'] = $HTTP_POST_VARS['category']; 

    elseif(isset(
    $HTTP_GET_VARS['category'])) 

        
    $smolf3d['category'] = $HTTP_GET_VARS['category']; 

    else 

        
    $smolf3d['category'] = '1'


    if(!isset(
    $category) || $category == 'category1'

    ?> 
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
    </head>
      <table cellSpacing="0" cellPadding="6" align="center" width="80%" border="0">
        <form action='<?php echo($_SERVER["PHP_SELF"]); ?>'> 
      <tr align="middle">
       <td width="50%" align="right">
    <b>Please choose categoty</b>
    </td>
       <td width="50%" align="left">
    <select name="category"> 
                    <option value="0">example 0</option>
    </select>
    </td>
      </tr>
      <table cellSpacing="0" cellPadding="6" align="center" width="80%" border="0"> 
         <tr align="middle">
        <td width="100%">
       <input class="butt" type="submit" value="Next"></td>
      </tr>
        </form>
    </table>
    </table>
    <?PHP 

    elseif(
    $category == '0'

    ?> 
            <table border="0" cellspacing="1" cellpadding="1" align="center" height="1" width="80%">
            <FORM method="POST" name="upload" value="0" action="<?php echo($_SERVER["PHP_SELF"]); ?>">
                                  <tr>
                <td class="theadingt" align="center" height="14" width="180">
                <b>Name:</b></td>
                <td class="theading" align="left" height="14" width="545">
                <input tabIndex="109" maxLength="250" size="47" name="smolf3d_1"></td>
              </tr>
              <tr>
                <td class="theadingt" align="center" height="14" width="180">
                <b>Subject:</b></td>
                <td class="theading" align="left" height="14" width="545">
                <input tabIndex="110" maxLength="250" size="47" name="smolf3d_2"></td>
              </tr>
                        <tr>
                <td class="theadingt" align="center" height="14" width="180">
                <span lang="en-us"><b>Msg:</b></span></td>
                <td class="theading" align="left" height="14" width="545">
                <textarea cols='48' rows='6' name='smolf3d_3'></textarea></td>
              </tr>
              <tr>
                <td class="theadingt" align="center" height="14" width="180">
                &nbsp;</td>
                <td class="theading" align="left" height="14" width="545">
                &nbsp;</td>
              </tr>
              <tr>
                <td class="theadingt" align="center" height="14" width="180">
                &nbsp;</td>
                <td class="theading" align="left" height="14" width="545">
                &nbsp;</td>
              </tr>
              <tr>
                <td class="pformstrip" style="TEXT-ALIGN: center" align="middle" height="16" width="100%" colspan="2">                                                
                   <input class="butt" type="submit" value="Next"></td></td>
              </tr>
                        <tr>
                <td class="pformstrip" style="TEXT-ALIGN: center" align="middle" colSpan="2" height="14" width="725">
                &nbsp;</td>
              </tr>
              </form>
            </table>
            <?PHP 

    elseif(
    $category == '1'

    ?> 
            <table border="0" cellspacing="1" cellpadding="1" align="center" height="1" width="80%">
                                  <tr>
                <td class="theadingt" align="center" height="14" width="180">
                <b>Name:</b></td>
                <td class="theading" align="left" height="14" width="545">
                <?php echo $_POST["smolf3d_1"]; ?></td>
              </tr>
              <tr>
                <td class="theadingt" align="center" height="14" width="180">
                <b>Subject:</b></td>
                <td class="theading" align="left" height="14" width="545">
                <?php echo $_POST["smolf3d_2"]; ?></td>
              </tr>
                        <tr>
                <td class="theadingt" align="center" height="14" width="180">
                <span lang="en-us"><b>Msg:</b></span></td>
                <td class="theading" align="left" height="14" width="545">
                <?php echo $_POST["smolf3d_3"]; ?></td>
              </tr>
              <tr>
                <td class="theadingt" align="center" height="14" width="180">
                &nbsp;</td>
                <td class="theading" align="left" height="14" width="545">
                &nbsp;</td>
              </tr>
              <tr>
                <td class="theadingt" align="center" height="14" width="180">
                &nbsp;</td>
                <td class="theading" align="left" height="14" width="545">
                &nbsp;</td>
              </tr>
              <tr>
                <td class="pformstrip" style="TEXT-ALIGN: center" align="middle" height="16" width="100%" colspan="2">                                                
                   <input class="butt" type="submit" value="Next"></td></td>
              </tr>
                        <tr>
                <td class="pformstrip" style="TEXT-ALIGN: center" align="middle" colSpan="2" height="14" width="725">
                &nbsp;</td>
              </tr>
            </table>
            <? 


    ?>
    Sorry for my bad English .

  2. #2
    SitePoint Evangelist ClickHeRe's Avatar
    Join Date
    Mar 2005
    Location
    Ottawa, Canada
    Posts
    580
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dunno about HTTP_GET_VARS but usually people use $_GET and $_POST for link or post variables

    secondly where is $category set ?
    and where is $smolf3d set ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •