andrew_ww Posted January 25, 2008 Share Posted January 25, 2008 Hello, I currently have this GetSQLValueString($_POST['txt_textbox'], "text"), I need to change the value contained here. I've done this okay and the result is a variable. I now need to change the above line of code so that it inserts a variable instead. I've tried this: GetSQLValueString($_POST[$element], "text"), but it does not work - Any suggestions. Link to comment https://forums.phpfreaks.com/topic/87736-solved-swap-parameter-for-variable/ Share on other sites More sharing options...
themistral Posted January 25, 2008 Share Posted January 25, 2008 Try GetSQLValueString($element, "text"), This does assume that the variable element has been set of course - you don't say where $element is being assigned a value. Link to comment https://forums.phpfreaks.com/topic/87736-solved-swap-parameter-for-variable/#findComment-448762 Share on other sites More sharing options...
andrew_ww Posted January 25, 2008 Author Share Posted January 25, 2008 Yes the variable is initialized before this code. Link to comment https://forums.phpfreaks.com/topic/87736-solved-swap-parameter-for-variable/#findComment-448767 Share on other sites More sharing options...
andrew_ww Posted January 25, 2008 Author Share Posted January 25, 2008 Problem solved. Fixed it by adding the variables to this bit of code: VALUES (%s, '$element', '$type', %s, %s, %s, %s, %s, %s)", Link to comment https://forums.phpfreaks.com/topic/87736-solved-swap-parameter-for-variable/#findComment-448770 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.