Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Closed Thread
Results 1 to 4 of 4

Thread: Parse error: syntax error

  1. #1
    Bagi Zoltán's Avatar
    Bagi Zoltán is offline Boss Cart consultant Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of
    Join Date
    Feb 2007
    Location
    Veszprém, Hungary
    Posts
    1,225

    Default Parse error: syntax error

    Hello everybody, i need a little help if you are my man. I keep on trying to create an if else relation in php, but all i get is a syntax error
    Parse error: syntax error, unexpected '=' in
    This is what i tried
    PHP Code:
    if ( $_SERVER["REQUEST_URI"] == $mosConfig_live_site/index.php?option=com_virtuemart&Itemid=26){ 
    I think for some reason the script is unable to compare the two URLs, but have no idea why not.
    Your help is highly appreciated!
    Thanks anyhow

  2. #2
    misi is offline Junior Member misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of
    Join Date
    Aug 2007
    Posts
    5

    Default

    below is the correct version of your code fragment:

    PHP Code:
    if($_SERVER["REQUEST_URI"] == "$mosConfig_live_site/index.php?option=com_virtuemart&Itemid=26"){ 
    ... you need to add " to the start and " to the end of the value what you compare ...

  3. #3
    misi is offline Junior Member misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of misi has much to be proud of
    Join Date
    Aug 2007
    Posts
    5

    Default

    complete debug block:


    PHP Code:
    if($_SERVER["REQUEST_URI"] == "$mosConfig_live_site/index.php?option=com_virtuemart&Itemid=26"){ print "hello 1"; }
    else {print 
    "hello 2";} 

  4. #4
    Bagi Zoltán's Avatar
    Bagi Zoltán is offline Boss Cart consultant Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of Bagi Zoltán has much to be proud of
    Join Date
    Feb 2007
    Location
    Veszprém, Hungary
    Posts
    1,225

    Default

    Misi, you are a magician, thank you very much i started to hack with parse_str ahhh...
    Rep added

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Error handling
    By lala in forum PHP Forum
    Replies: 0
    Last Post: 11-24-2007, 09:20 PM
  2. Error gone?
    By temi in forum General Webmaster Talk
    Replies: 3
    Last Post: 09-26-2007, 11:15 AM
  3. Installation - SQL error
    By northernwc in forum Boss Cart Installation Help
    Replies: 12
    Last Post: 09-19-2006, 09:43 AM
  4. 661 error
    By jacky820 in forum iG Shop
    Replies: 3
    Last Post: 12-17-2004, 01:52 AM
  5. Fatal error
    By pteixeira in forum iG Shop
    Replies: 1
    Last Post: 04-10-2004, 12:36 AM

Bookmarks

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

Search Engine Friendly URLs by vBSEO 3.6.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124