Jump to content

Replacing string


i8grand

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.