I need a php whiz smarter than me to look at this code.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Adult Site Traffic
    Confirmed User
    • Mar 2003
    • 5093

    #1

    I need a php whiz smarter than me to look at this code.

    I don't understand why this gives errors. I have used it before in .php hosted gallery pages etc.

    PHP Code:
    {
          echo "<tr><td align=\"center\" colspan=\"".(COL_CATEG * 2)."\"><a href=\"".$PHP_SELF."?categ=".$categ."&sta=".($sta - $show)."\"><img border=\"0\" src=\"http://site.com/members/images/back.jpg\" style=\"border: 1px solid #FF3399\" alt=\"Previous page of members area content\" width=\"150\" height=\"45\"></a>
    &nbsp;nbsp;<a href=\"<?=$_GET["categ"]?>_next.php\"><img border=\"0\" src=\"http://site.com/members/images/next.jpg\" style=\"border: 1px solid #FF3399\" alt=\"Next page of members area content\" width=\"150\" height=\"45\"></a></td></tr>";
    This is the code giving the error:
    PHP Code:
    <a href=\"<?=$_GET["categ"]?>_next.php\">
    I have also used:
    PHP Code:
    <a href=\"<?=$_GET[\"categ\"]?>_next.php\">
    This is the error:
    Parse error: parse error, unexpected '\"', expecting T_STRING or T_VARIABLE or T_NUM_STRING

    Ideas?

    Thanks.

    ALL Domains and Websites are GOING AWAY NOW! Ask me!
    Many great domains, mainstream and adult, some complete sites with databases, some names with traffic and PR, some investment quality names. Come take a look! { Traffic Orders: Please go here }

    .:: SHARPEN the Elite - BURN the leftovers! Ooh-Rah!! ::.
  • spacemonk
    Confirmed User
    • Jul 2004
    • 969

    #2
    you forgot an echo
    I sale fu-fme, hit me up for a killer deal!

    Comment

    • AcidMax
      Confirmed User
      • May 2002
      • 1827

      #3
      Looks to be

      <a href="<?=$_GEThahaha91;"categ"]?>_next.php\">

      Look at the categ... you have ;" instead of ;\" like your other example shows. Hard to know without seeing the code work etc, but looking at your other example and based on the error its missing the \ which is an escape.
      Latest MMA news. http://www.mmawrapup.com

      Comment

      • Veterans Day
        Confirmed User
        • Jul 2003
        • 8403

        #4
        contact silvertab he is php ninja, tell him I sent ya. Hes a good friend of mine. I wont fuck with noone else 94586959
        Build a Massive Traffic Network, Hands FREE, Totally Automated

        Comment

        • Adult Site Traffic
          Confirmed User
          • Mar 2003
          • 5093

          #5
          Where?

          What makes it any different? The only code in question is:

          href=\"<?=$_GET["categ"]?>_next.php\"
          vs
          href=\"next.php\"

          http://adult-site-traffic.com/phpcode.htm is the real code. Board fucked it up.

          .

          ALL Domains and Websites are GOING AWAY NOW! Ask me!
          Many great domains, mainstream and adult, some complete sites with databases, some names with traffic and PR, some investment quality names. Come take a look! { Traffic Orders: Please go here }

          .:: SHARPEN the Elite - BURN the leftovers! Ooh-Rah!! ::.

          Comment

          • Adult Site Traffic
            Confirmed User
            • Mar 2003
            • 5093

            #6
            Originally posted by AcidMax
            Looks to be

            <a href="<?=$_GEThahaha91;"categ"]?>_next.php\">

            Look at the categ... you have ;" instead of ;\" like your other example shows. Hard to know without seeing the code work etc, but looking at your other example and based on the error its missing the \ which is an escape.
            Ok, I tried this:
            href=\"<?=$_GET[\"categ\"]?>_next.php\"

            and this:
            href=\"<?=$_GET["categ"]?>_next.php\"

            But I should have this instead ?
            href=\"<?=$_GET[\"categ"]?>_next.php\"

            Thank you.

            .

            ALL Domains and Websites are GOING AWAY NOW! Ask me!
            Many great domains, mainstream and adult, some complete sites with databases, some names with traffic and PR, some investment quality names. Come take a look! { Traffic Orders: Please go here }

            .:: SHARPEN the Elite - BURN the leftovers! Ooh-Rah!! ::.

            Comment

            • ssp
              Confirmed User
              • Jan 2005
              • 7990

              #7
              Why don't you just use this:

              <a href=\"" . $_GET["categ"] . "_next.php\">
              Last edited by ssp; 05-29-2005, 06:29 AM.

              Comment

              • spacemonk
                Confirmed User
                • Jul 2004
                • 969

                #8
                Originally posted by Adult Site Traffic
                Ok, I tried this:
                href=\"<?=$_GET[\"categ\"]?>_next.php\"

                and this:
                href=\"<?=$_GET["categ"]?>_next.php\"

                But I should have this instead ?
                href=\"<?=$_GET[\"categ"]?>_next.php\"

                Thank you.

                .
                You forgot an echo

                href=\"<? echo $_GET["categ"] ?>_next.php\"
                I sale fu-fme, hit me up for a killer deal!

                Comment

                • Juicy D. Links
                  So Fucking Banned
                  • Apr 2001
                  • 122992

                  #9
                  echo 5<> output echo roger over

                  print <> word

                  Comment

                  • Trafficbrokercom
                    Confirmed User
                    • Dec 2002
                    • 542

                    #10
                    He did not forget an echo the '=' equals "echo" in this case ..

                    the problem is a little bit more complex , what you are trying to do is basically starting a second php instance within an existing one (<? ... <?)

                    so change this code:

                    Code:
                    <a href="<?=$_GET["categ"]?>_next.php\">
                    to

                    Code:
                    <a href=\"" . $_GET["categ"] . "_next.php\">
                    the two quotation marks after the href are very important btw ..
                    Last edited by Trafficbrokercom; 05-29-2005, 06:39 AM.

                    Comment

                    • Adult Site Traffic
                      Confirmed User
                      • Mar 2003
                      • 5093

                      #11
                      Originally posted by ssp
                      Why don't you just use this:

                      <a href=\"" . $_GET["categ"] . "_next.php\">
                      YOU are fucking smart

                      .

                      ALL Domains and Websites are GOING AWAY NOW! Ask me!
                      Many great domains, mainstream and adult, some complete sites with databases, some names with traffic and PR, some investment quality names. Come take a look! { Traffic Orders: Please go here }

                      .:: SHARPEN the Elite - BURN the leftovers! Ooh-Rah!! ::.

                      Comment

                      • Adult Site Traffic
                        Confirmed User
                        • Mar 2003
                        • 5093

                        #12
                        Originally posted by Juicy D. Links
                        echo 5<> output echo roger over

                        print <> word
                        LOL Juicy

                        format C:\

                        ALL Domains and Websites are GOING AWAY NOW! Ask me!
                        Many great domains, mainstream and adult, some complete sites with databases, some names with traffic and PR, some investment quality names. Come take a look! { Traffic Orders: Please go here }

                        .:: SHARPEN the Elite - BURN the leftovers! Ooh-Rah!! ::.

                        Comment

                        • ssp
                          Confirmed User
                          • Jan 2005
                          • 7990

                          #13
                          Glad I could help you out.

                          Comment

                          • AcidMax
                            Confirmed User
                            • May 2002
                            • 1827

                            #14
                            Sorry I guess the shit was encoded when you put it on here, so it looked like a " was unescaped. Glad you got it sorted out.
                            Latest MMA news. http://www.mmawrapup.com

                            Comment

                            Working...