i8grand Posted April 19, 2010 Share Posted April 19, 2010 I am wanting to replace a string with another but don't know the exact code to do so! $dbQueryRestart = "SELECT puzzlestatus.status, puzzle.startGrid, customers.id, puzzle.id ". "FROM customers, puzzlestatus, puzzle ". "WHERE customers.id = puzzlestatus.playerID AND puzzle.id = puzzlestatus.puzzleID"; $resultRestart = mysql_query($dbQueryRestart, $db); $dbRowRestart = mysql_fetch_array($resultRestart); $restartstatus = $dbRowRestart[0]; $restartGrid = $dbRowRestart[1]; echo "<input id=\"restart\" type=\"button\" value=\"Restart\" onClick=\"$restartstatus=$restartGrid\">"; This is the code I have. I am wanting to replace the puzzlestatus.status with puzzle.startGrid but am not sure what to do with the onClick!? I think onClick=\"$restartstatus=$restartGrid\" is wrong, any help would be great! Thanks, Dylan Link to comment https://forums.phpfreaks.com/topic/199035-replacing-string/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.