Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8282147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:16:18+00:00 2026-06-08T10:16:18+00:00

I am using a PHP variable called LeagueLink. When the user is not logged

  • 0

I am using a PHP variable called LeagueLink. When the user is not logged in I want the variable to read the text (Already have a league…) followed by a link to a popup window. So far it is displaying correctly except when I click on the link nothing happens. I think I just have a syntax error from mixing so much PHP and JS, but I can’t figure out where. Please help make the popup window link work if you can…

<?php 
 // this starts the session 
 session_start();
 $_SESSION['userid'];
 $message = "";
 if ($_SESSION['userid'] == "") {
    $message = "You must create an account or sign in to play!";
    $LeagueLink = "Already have a league...<a href='JavaScript:newPopup(\"http://www.yourfantasyfootballreality.com/signin.php\");' class='two'>Sign In</a>";
 } else {
    $message = "Hello, " .$_SESSION['userid'] . " make your picks!";
 }

 ?> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
        <script type="text/javascript" src="js/jquery-easing-1.3.pack.js"></script>
        <script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"></script>
        <script type="text/javascript" src="js/coda-slider.1.1.1.pack.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="icon" href="http://www.indiana.edu/favicon.ico" />
        <title>YourFantasyFootballReality</title>
        <link rel="stylesheet" type="text/css" href="mystyle.css" />

    </head>
        <body>
            <?=$message?>
            <?=$LeagueLink?>
            <?=$ActionLink?>
        </body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:16:22+00:00Added an answer on June 8, 2026 at 10:16 am

    JavaScript:newPopup is a function that needs to be defined.

    I think what you are looking for is the following: You don’t need javascript to open the page in a new window. Just set the target property of the link to _blank.

    $LeagueLink = "Already have a league...<a href='http://www.yourfantasyfootballreality.com/signin.php' target='_blank' class='two'>Sign In</a>";
    

    EDIT: If you want it popping up, rather than opening in a new tab, you can resize it immediately after it is spawned. Add the following to your javascript.

    function newPopup()
    {
    var url='http://www.yourfantasyfootballreality.com/signin.php';
    windowProperties = "toolbar=no,menubar=no,scrollbars=no,statusbar=no,height=500px,width=500px,left=50%,top=50%";
    popWin = window.open(url,'newWin',windowProperties);
    }
    

    and keep your PHP the same as before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page called Error.php. Variables are usually passed to it using the
I want the value of JavaScript variable which i could access using PHP. I
Using for loop in PHP can we have numbers associate with a variable name?
I have a PHP function that takes a variable number of arguments (using func_num_args()
I needed suggestions for the following scenario. I have a php variable called $data
I'm working in PHP. I have a function (F1) that gets called a variable
I have a variable called messages and I want to pass the value of
I have a php variable called $image which holds the contents of a medium
I have this method that I want to run a php file using ajax
I am currently using jQuery to load a variable php layout depending on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.