KevMull Posted July 21, 2008 Share Posted July 21, 2008 Sorry for the noob question but my form text boxes are all showing a '/' (forward slash) by default. I've tried the function stripslashes() which doesn't seem to work in this case. How can I set the default values to null? Many Thanks Link to comment https://forums.phpfreaks.com/topic/115808-how-do-i-remove-forward-slash-asin-null-text-box/ Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 some code please Link to comment https://forums.phpfreaks.com/topic/115808-how-do-i-remove-forward-slash-asin-null-text-box/#findComment-595333 Share on other sites More sharing options...
KevMull Posted July 21, 2008 Author Share Posted July 21, 2008 It's just a basic html text box... </php... $firstName = $_POST['firstName']; ?> ..... <form> <input type="text" name="firstName" value=<?php print $firstName ?> ...... </form> A '/' is always shown as the initial value Link to comment https://forums.phpfreaks.com/topic/115808-how-do-i-remove-forward-slash-asin-null-text-box/#findComment-595353 Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 always enclose value attribute in quotes, also close input tag with ">" </php... $firstName = $_POST['firstName']; ?> ..... <form> <input type="text" name="firstName" value="<?php print $firstName ?>"> ...... </form> Link to comment https://forums.phpfreaks.com/topic/115808-how-do-i-remove-forward-slash-asin-null-text-box/#findComment-595356 Share on other sites More sharing options...
KevMull Posted July 21, 2008 Author Share Posted July 21, 2008 Many thanks, that fixed it. Link to comment https://forums.phpfreaks.com/topic/115808-how-do-i-remove-forward-slash-asin-null-text-box/#findComment-595358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.