This content has been marked as final. Show 4 replies
The quotes around your variable in your cfif tag might be messing you up. Also, if the number does not start with a 0, your phoneno variable won't be defined.
ok thanks i have done that and put a cfelse in, but now i get an error for the two # in line 1
<cfif left(form.PlayerPhone_#currRow#,1) EQ "0">
<cfset PhoneNo=removeChars(replace("form.PlayerPhone_#currRow#", " ", "", "all"),1,1)>
I forget the exact syntax you need, but it might involve square brackets.
ok i have sorted it but with 1 small problem.
if one of the "playerphone" has a space in it, instead of removing it, it actually removes the "f" from form.playerphone as in the error below
any ideas how to sort this?
SQL INSERT INTO sms_players_table (PlayerFirstName, PlayerSurname, PlayerPhone, ClubID) VALUES ('Robert', 'Aitken', orm.PlayerPhone_3, 3)