i have this problem i have this variable
$title=J1. Tsalgatidou, A., " Modeling and Animating Information Systems Dynamics " , Information Processing Letters 36, 1990, 123-127.
and then i do this

$more_button='  <input type="button" id="button_help1"  value="Summary" onClick="window.location=\'some_infos_research_en.php?title='.$title.'\'">
				<input type="button" id="button_help1"  value="Full description" onClick="window.location=\'upload/publications/en/'.$file.'\'">';

but when i echo $more_button the button summary doesn't work. I know that the problem is with the " that variable $title has but how i can bypass this problem?
thank you very much

You have to replace $title with htmlspecialchars($title) when you output.

i.e.:

$more_button='  <input type="button" id="button_help1"  value="Summary" onClick="window.location=\'some_infos_research_en.php?title='.htmlspecialchars($title).'\'">
				<input type="button" id="button_help1"  value="Full description" onClick="window.location=\'upload/publications/en/'.$file.'\'">';

thank you very much for your help

thank you and another question the space is &nbsp; Do you know what code is for enter? Thank you very much

thank you and another question the space is &nbsp; Do you know what code is for enter? Thank you very much

<br>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.