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

  • SEARCH
  • Home
  • 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 8675989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:04:48+00:00 2026-06-12T20:04:48+00:00

first time posting, hopefully this will be helpful to others too. I’ve found a

  • 0

first time posting, hopefully this will be helpful to others too. I’ve found a few posts on this topic but it appears I’m having quite a specific problem.

This is my output in PHP

questions=The ‘Sea Swallow’ is an alternative name for which bird?/In which sport would you see a ‘Western Roll’?/Who is better known as ‘Herbert Khaury’?/’Diet’ is the parliament of which country?/What is the real first name of Coco Chanel?/’The Aztecs’ were natives of which country?/What was invented by‘O.A. North’ in 1869?/King Zog was the ruler of which country?&answers=Seagull/Penguin/Tern/Cormorant&correct=0/0/1/0&

And this is my AS3 code

     var         request:URLRequest = new             
URLRequest("http://localhost:8888/Quiz/questions.php");
            request.method = URLRequestMethod.GET;

            var loader2:URLLoader = new URLLoader();
            loader2.addEventListener(Event.COMPLETE, completeHandler);
            loader2.dataFormat = URLLoaderDataFormat.TEXT;
            loader2.load(request);


            function completeHandler(event:Event) :void{

            var questions1 = event.target.data.questions1;

            // dynamic text box called username

            questionbox.question.text=event.target.data.questionbox.question.text;

            }

            var questions:String;
            var questionsArray:Array=questions.split("/");

I’m trying to get the question to appear in a dynamic text box,but am receiving the error code #2007 Parameter text must be non-null.

I’m effectively trying to turn my string into an array.

Can anybody see the problem here?

Any help would be greatly appreciated! Thanks in advance

EDIT:

This is my PHP code

<?php
//functions

function get_id($column, $table)
{
 $sql    = mysql_query("select $column FROM $table") ;
 while ($row    =mysql_fetch_array($sql))
 {
  return $row["ID"];
 }
}

function getquestions($id)
{
 $sql    =mysql_query("select text FROM questions WHERE quiz_ID =$id ");
 $questions   = array();
 while($row   = mysql_fetch_row($sql))
 {
  $questions[] = $row[0];
 }
 return $questions;
}

function getanswers($id)
{
 $sql    = mysql_query("select answer FROM answers WHERE question_ID= $id ");
 $answers = array();
 while($row    =mysql_fetch_row($sql))
 {

  $answers[] = $row[0]; 
 }

 return $answers;
}

function getcorrect($id)
{
 $sql    = mysql_query("SELECT correct FROM answers WHERE question_ID= $id ");
 $correct   =array();
 while($row    =mysql_fetch_assoc($sql))
 {
  $correct[]    =$row["correct"]; 
 }
   return $correct;
}


//Connect to Database
$con = mysql_connect("localhost","dinita","3nd3m0luk");

if(!$con)
{
 die('Could not connect: '.mysql_error());
}

else
{

 // SELECT DATABASE
mysql_select_db("quizCreation", $con);

// Create an array of data from database


$quizid    = get_id("ID","quizName");
$questionid    = get_id("ID", "questions");
$ques   = implode("/",getquestions($quizid));
$ans    =implode("/",getanswers($questionid)); 
$cor    =implode("/", getcorrect($questionid));


echo htmlentities( "questions"."=". $ques."&");
echo htmlentities("answers"."=".$ans."&");
echo htmlentities("correct"."=".$cor."&");

}

mysql_close($con); 

?>
  • 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-12T20:04:49+00:00Added an answer on June 12, 2026 at 8:04 pm

    If that is the output of your php code, then if you have to visualize it in the textield, you should change it like this:

            var questions:String = event.target.data.questions;
            questionbox.question.text=questions;
    

    And if you want to convert the String as an Array, then do like this:

           var questionsArray:Array=questions.split("/");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time posting -- I found similar issues but not anything
This is my first time posting here, but I've found a lot of answers
this is my first time posting on a forum. But I guess I will
this is my first time posting on StackOverflow but this site is awesome. Thanks
use this website a lot but first time posting. My program creates a number
This is my first time posting to stackoverflow, but these threads have helped me
this is my first time posting on here and have read alot of helpful
Hey guys, this is my first time actually posting at stackflow but i've used
this is my first time posting here, but I didn't know where else to
So this is my first time posting here but I'm more or less stumped.

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.