SA-MP Forums Archive
echo querystring - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: echo querystring (/showthread.php?tid=394185)



echo querystring - Dusan01 - 21.11.2012

hy guys! I dont know with php, and my firend sended me UCP, and where i need to add this to can see errors,
Код:
echo querystring[]; exit;
THANKS!


Re: echo querystring - ca2k - 21.11.2012

http://www.php.net/manual/en/errorfu...rror-reporting


Re: echo querystring - Dusan01 - 21.11.2012

Quote:
Originally Posted by ca2k
Посмотреть сообщение
i added this:
Код:
echo querystring[]; exit;
session_start();
and error:
Код:
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/a1396719/public_html/ucp/index.php on line 6
What now?


Re: echo querystring - ca2k - 21.11.2012

Quote:
Originally Posted by Dusan01
Посмотреть сообщение
i added this:
Код:
echo querystring[]; exit;
session_start();
and error:
Код:
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/a1396719/public_html/ucp/index.php on line 6
What now?
Now you ask from the wise php people @ http://forums.phpfreaks.com/forum/13-php-coding-help/ . I've seen you posting several questions regarding php help but people don't tend to like it around here. I personally don't have anything against it - would be nice having web dev. section.


Re: echo querystring - royal_king - 21.11.2012

Firstly I didn't understand what's your problem exactly. If you can post the source code or show it personally I can help you out.


Re: echo querystring - Sinner - 22.11.2012

I assume you mean $querystring is an array (looking at the []), either way this works for everything.

PHP код:
if(is_array($querystring)) {
    foreach(
$querystring as $string) {
        echo 
$string ."<br />";
    }
} else {
    echo 
$querystring;
}
exit;