[Solved] Calling a PHP variable through button onclick [closed]


I suppose you’re not correctly encoding the content of the variables (known as XSS)

You need to urlencode the content of your variables. Also, & needs to be entered as an HTML entity &.

Try:

$url="edit_beginningcakephp.php?title=".urlencode($title).'&author=".urlencode($author)."&isbn='.urlencode($isbn).'&year=".urlencode($year)."&pages=".urlencode($pages)."&price=".urlencode($price);

PS: >?should be ?> and make sure the URL doesn”t contain any newlines.

4

solved Calling a PHP variable through button onclick [closed]