jazzman1 Posted March 15, 2013 Share Posted March 15, 2013 Put it this on the top of that script and give me the path name: EDIT: I am going to smoke echo realpath(dirname(__FILE__)); Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418902 Share on other sites More sharing options...
jiameow Posted March 15, 2013 Author Share Posted March 15, 2013 Put it this on the top of that script and give me the path name: EDIT: I am going to smoke echo realpath(dirname(__FILE__)); D:\xampp\htdocs\def Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418903 Share on other sites More sharing options...
jazzman1 Posted March 15, 2013 Share Posted March 15, 2013 Sorry, it should be only: echo __FILE__; Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418906 Share on other sites More sharing options...
jiameow Posted March 15, 2013 Author Share Posted March 15, 2013 Sorry, it should be only: echo __FILE__; D:\xampp\htdocs\def\admin-addservices.php Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418907 Share on other sites More sharing options...
jazzman1 Posted March 15, 2013 Share Posted March 15, 2013 Ok, than, put it this line of code immediately after $service = protect($_POST['services']); submit the form and give me back the result: echo "<input type=\"submit\" name=\"submit\" value=\"Finish Registration!\" />"; echo "</form>"; }else { $service = protect($_POST['services']); // here echo '<pre>'.print_r($service, true).'</pre>'; exit; Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418909 Share on other sites More sharing options...
jiameow Posted March 15, 2013 Author Share Posted March 15, 2013 still the same error Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418910 Share on other sites More sharing options...
jazzman1 Posted March 15, 2013 Share Posted March 15, 2013 Ok , and now: echo "<input type=\"submit\" name=\"submit\" value=\"Finish Registration!\" />"; echo "</form>"; }else { // here echo '<pre>'.print_r($_POST['services'], true).'</pre>'; exit; $service = protect($_POST['services']); Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418912 Share on other sites More sharing options...
jiameow Posted March 15, 2013 Author Share Posted March 15, 2013 Ok , and now: echo "<input type=\"submit\" name=\"submit\" value=\"Finish Registration!\" />"; echo "</form>"; }else { // here echo '<pre>'.print_r($_POST['services'], true).'</pre>'; exit; $service = protect($_POST['services']); still the same :/ Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418913 Share on other sites More sharing options...
jazzman1 Posted March 15, 2013 Share Posted March 15, 2013 Put it the value attribute to <input type="text" name="services" value="" /> for every case and try again. Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418915 Share on other sites More sharing options...
jiameow Posted March 15, 2013 Author Share Posted March 15, 2013 thanks for your help we already solved it.. thanks alot for your kindness Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418917 Share on other sites More sharing options...
jazzman1 Posted March 15, 2013 Share Posted March 15, 2013 You had an error inside the input field. See, what result I got when I copy/paste the code to my NetBeans and open up in firebug: <input type="\"text\"" style="width:400px;" name="\"services\""> There was to much posting here, sorry about it Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418921 Share on other sites More sharing options...
Barand Posted March 15, 2013 Share Posted March 15, 2013 thanks for your help we already solved it.. thanks alot for your kindness Have you ever had the frustrating experience of searching Google with a problem only to find dozens of people asking the question but no one posting a solution to it. Now you can see why this happens Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418924 Share on other sites More sharing options...
teynon Posted March 16, 2013 Share Posted March 16, 2013 This type of post is why I stopped coming here a while ago. I'm starting to wonder why I did. Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418925 Share on other sites More sharing options...
jazzman1 Posted March 16, 2013 Share Posted March 16, 2013 This type of post is why I stopped coming here a while ago. I'm starting to wonder why I did. I don't agree with you. Phpfreaks is a very useful and interesting forum. I think that's why, you are come back. I like the people like OP and don't like the people like these. Link to comment https://forums.phpfreaks.com/topic/275705-php-error-undefined-index/page/2/#findComment-1418994 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.