Jump to content

Search the Community

Showing results for tags 'undefined variables'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 2 results

  1. Hi I am hoping someone can help. My hosting company has just moved my website to a different server, and I noticed that it was giving me blank pages, I added in some debug and now I am getting undefined variable errors and I don't know why or how to fix it. The Page which has broken currently gets its information from the database from the url. RewriteRule ^reviews/([^/]*)\/$ /bingosite.php?h1=$1 [L] The code in the broken page that is throwing out undefined variable errors is the following: <? $query = mysql_query("SELECT * FROM link where linktype='bingo' and h1 ='".StripUrl101(ucwords($h1))."'"); { while($row =mysql_fetch_assoc($query)) extract($row);?> <? if ($linkType=="bingo") { ?> <?php echo "$h1"; ?> <? } } ?> I have used this code for years so it could be that it is old but as I only know basic PHP I am very stuck and the hosting company isn't being very helpful. Just to add if I write <? $query = mysql_query("SELECT * FROM link where linktype='bingo' and h1 ='Quick Bingo'"); { while($row =mysql_fetch_assoc($query)) extract($row);?> The results for Quick Bingo appear on the page. However it needs to work dynamically like it was doing before. If anyone can help it would be appreciated. Thanks Rachael
  2. I recently filled out a job application for a web developer position. In addition to the usual 'tell us about yourself' questions, I was presented with this one. After searching the web and hacking at it for nearly an hour. I just punched in 5. I'm sure it's wrong. Anyway, I was wondering if someone could give me some clarification on what is happening here: <?php /* What value should you replace the '?' with to make the output read 10? */ var x = 6; var y = 4; var a = function(b) { return function© { return y + b + c; } }; x = 2; y = 5; var fn = a(x); x = 1; y = 3; var unknown = ?; console.log(fn(unknown));* ?> Am I reading correctly that the value of var a is equal to the value returned by function(b) which is equal to the value returned by function© which is y + b + c? I concluded that the value of var a = 4 + 2b + 2c. But since var b and var c are not defined how would I go about getting a strictly numeric value as output? Pardon my ignorance, but I have faced questions like this for other job apps and I am tired of staring at the screen like an idiot! Any clarification would be greatly appreciated!
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.