SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Dec 2001
    Location
    Vancouver, Canada
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I've used these codes a hundred time, but now it's not working

    My php knowledge is very limited to what I need.

    I've used these simple codes many times, but I'm wondering if something changed in the world of php, which I'm not aware of.

    I mainly take values within my URLs and add them to my text and links.

    Here are actual examples codes:

    PHP Code:
    <h2 class="maintitle">Find the Lowest <? print "$title"?> Rates Among 
      100 Mortgage Lenders Servicing <? print "$local"?> — up to 5 Quotes!</h2>
    The value "title" and "local" should show up in the text, but they don't.

    I also have in my links:

    PHP Code:
    <? print "<a href='https://www.mortgageshoppercanada.com/refinancetypeloan.php?kwy=$kwy&local=$local&credit=$credit'>Mortgage Refinance</a>"?>
    The values are not being picked up in the link. As if these values didn't exist in the url.

    I'm not sure exactly what is the problem. These are very simple codes.

    Here is an actual link to my webpage:

    https://www.mortgageshoppercanada.com/ppc/index.php?province=British%20Columbia&credit=Good&loantype=Home%20equity&local=BC&title=First%20And%20Second%20Mortgage%20Loans&kwy=keywordtest_GCAMSCBC

    any ideas?

  2. #2
    SitePoint Enthusiast RicoKnox's Avatar
    Join Date
    Aug 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a guess but the server may not support shorthand.

    Replace all
    PHP Code:
    <?
    With

    PHP Code:
    <?php
    It may not be this but you should try incase.
    www.developlive.com

    "Richard's great communication and
    accuracy of coding are second to none.
    "

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Also it looks like the code is using register_globals stop using those never ever touch them again.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  4. #4
    SitePoint Addict
    Join Date
    Dec 2001
    Location
    Vancouver, Canada
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    if someone can fix my problems in the next couple of hours, you're hired :)

    I've replaced a couple of links and php codes within my page

    PHP Code:
    <?  replaced with <?php
    But it made no difference.

    I also read about register_globals and feel that this may be the case. I'm using shared hosting so I don't have control over this.

    I realize I have to learn more about php, but I need to launch this in the next couple of hours. Is there someone who can just spoon feed me with the correct codes and I'll PAY HIM OR HER FOR IT.

    Basically, if someone knows what needs to be done and can fix this problem in the next couple of hours, I'd hire that person.

    I also have another problem with my javascript. You can see the post at http://www.sitepoint.com/forums/showthread.php?t=496557 .

    I've tried the solution presented and it didn't work.

    SO IF THERE IS SOMEONE WHO KNOWS PHP AND JAVASCRIPT and can fix my problem in the next couple of hours, please let me know and I'll pay you for correcting my page and making it work.

    thanks

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure you're catching all the passed in variables by putting $title = $_GET['title'] etc. in your code. Besides that being a possibility, there's nothing wrong with your code and it should work.

  6. #6
    SitePoint Addict
    Join Date
    Dec 2001
    Location
    Vancouver, Canada
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hmichaels View Post
    Make sure you're catching all the passed in variables by putting $title = $_GET['title'] etc. in your code. Besides that being a possibility, there's nothing wrong with your code and it should work.
    Hi hmichaels,

    Thanks for the tip. I was able to resolve my problem partially.

    I got the following code working.
    PHP Code:
    <? echo $_GET['title']; ?>
    But I still don't know how to get my links to take the values in the url. I'm pretty new at programming. I've tried reading on this over night, but now I'm under pressure to launch 2 hours ago. My background is not programming--it's marketing.

    So the following codes are the ones I've tried so far.

    PHP Code:
    <?php print "<a href='https://www.mortgageshoppercanada.com/refinancetypeloan.php?kwy=$kwy&local=$local&credit=$credit'>Home Refinance Loan</a>"?>
     
    <?php print "<a href='https://www.mortgageshoppercanada.com/refinancetypeloan.php?echo $_GET['title']&local=$local&credit=$credit'>Mortgage Refinance</a>"?>
    The last one gives me a parse error. Can anyone tell me the error or even send me an instant message to do the work and I'll pay them. They would have to also know javascript since I also have a problem which is described at: http://www.sitepoint.com/forums/showthread.php?t=496557 .

    My main problem is I've run out of time. I've spent the entire night working on this.

    Thanks for the help so far

  7. #7
    SitePoint Addict
    Join Date
    Dec 2001
    Location
    Vancouver, Canada
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    allright,

    I finally figure it out. Thanks hmichaels for the code you gave. I was able to make it work by playing with your codes a little.

    And thanks everyone else who helped.


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
  •