0

Hey guys!

I have an error with the ' and " tags, I can't work out which way they should go..

<?php
$uzivatel = mysql_query("SELECT * FROM ip WHERE ip = '" . $ip . "' LIMIT 1");
while($uzivatele = mysql_fetch_array($uzivatel)){
echo '<center><input type="text" value="' . $stranka . '?id=' . $uzivatele['kod'] .  '" onclick="this.focus(); this.select();" size="33" name="odkaz" class="odkaz"></center>';
?>

Any ideas at all?

Edited by Jaygould: n/a

2
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by diafol
0
<?php
$uzivatel = mysql_query("SELECT * FROM ip WHERE ip = '$ip' LIMIT 1");
while($uzivatele = mysql_fetch_array($uzivatel)){
echo "<center><input type=\"text\" value=\"{$stranka}?id={$uzivatele['kod']}\" onclick=\"this.focus(); this.select();\" size=\"33\" name=\"odkaz\" class=\"odkaz\"></center>";
?>
0

Still getting the same error...

Shall I post the full file code?

0

it would help. post the error msg too

Edited by diafol: n/a

0

It's just in that part of the code, whenever I take it out the PHP parses fine.

Here's the error when the code is in:

Parse error: syntax error, unexpected $end in /home/jaygould/public_html/domain.com/trial.php on line 192

1

You have no closing brace (}) at the end of the while loop

0

ok please mark as solved - the link below - just above the edit box.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.