zenmind Posted October 11, 2012 Share Posted October 11, 2012 I ran through all the possibilities of strings , paranthesis , basically the syntax issues but can seem to figure out whats throwing a fit. It seems lines 15, 16 , 17 are giving problems . <!DOCTYPE html > <html> <head> <title>Buy Your Way to a Better Education!</title> <link href="http://www.cs.washington.edu/education/courses/cse190m/09sp/labs/4-buyagrade/buyagrade.css" type="text/css" rel="stylesheet" /> </head> <body> <h1>Thanks, sucker!</h1> <p>Your information has been recorded.</p> <?php $name = $_POST['name']; $ccNo = $_POST['ccNo']; $ccType = $_POST['ccType']; echo "Your name ". $name . " " . "<br/>"; echo "Credit Card Type:" . $ccType . "<br />"; echo "Credit Card No: " . $ccNo; ?> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/ Share on other sites More sharing options...
berridgeab Posted October 11, 2012 Share Posted October 11, 2012 Nothing visibly wrong with the code whats the error? Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1384549 Share on other sites More sharing options...
Psycho Posted October 11, 2012 Share Posted October 11, 2012 I ran through all the possibilities of strings , paranthesis , basically the syntax issues but can seem to figure out whats throwing a fit. It seems lines 15, 16 , 17 are giving problems . And what would those problems be? Are you getting error messages? if so, what are they. Are they doing something differently than you expect? If so, what do you expect and what are they doing? Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1384563 Share on other sites More sharing options...
Jessica Posted October 11, 2012 Share Posted October 11, 2012 I'm going to guess undefined index. If so, OP do a print_r($_POST); What do you see? Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1384568 Share on other sites More sharing options...
DarkerAngel Posted October 11, 2012 Share Posted October 11, 2012 Did anyone actually read his code? <!DOCTYPE html > <html> <head> <title>Buy Your Way to a Better Education!</title> <link href="http://www.cs.washington.edu/education/courses/cse190m/09sp/labs/4-buyagrade/buyagrade.css" type="text/css" rel="stylesheet" /><!-- Full link CSS? Seems offsite --> </head> <body> <h1>Thanks, sucker!</h1><!-- Why exactly would end user be a sucker? --> <p>Your information has been recorded.</p><!-- Information has been recorded? What Kind? --> <?php $name = $_POST['name']; $ccNo = $_POST['ccNo']; $ccType = $_POST['ccType']; echo "Your name ". $name . " " . "<br/>"; // Oh my name? echo "Credit Card Type:" . $ccType . "<br />"; // And my credit card type? echo "Credit Card No: " . $ccNo; // And the number? ?> </body> </html> It looks like he's asking for help with a phishing script, I think I'm going to report this... Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1384586 Share on other sites More sharing options...
Psycho Posted October 11, 2012 Share Posted October 11, 2012 Did anyone actually read his code? Yes, I did. I also noticed that the URI for the CSS file is pointing to a folder on the University of Washington domain under a folder for a computer science course. Based upon the very basic code presented here it I think it's safe to say that the person is doing an assignment and just chose a very poor choice for the script. On the off chance that s/he is trying to do something malicious, if they can't put together a simple form processing script using just three fields I don't think we are in danger of getting scammed. Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1384602 Share on other sites More sharing options...
DarkerAngel Posted October 11, 2012 Share Posted October 11, 2012 Yes, I did. I also noticed that the URI for the CSS file is pointing to a folder on the University of Washington domain under a folder for a computer science course. Based upon the very basic code presented here it I think it's safe to say that the person is doing an assignment and just chose a very poor choice for the script. On the off chance that s/he is trying to do something malicious, if they can't put together a simple form processing script using just three fields I don't think we are in danger of getting scammed. That made me LOL a lil, yeah with the current requests he couldn't get too far, ATM I'm not going to elaborate any ways to make it better just to be safe, but if he is trying something malicious he can keep for all I care. Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1384607 Share on other sites More sharing options...
Philip Posted October 11, 2012 Share Posted October 11, 2012 Yup, agreed with Pyscho here. Also, if the OP cannot get it working with that simple of a script... and you get phished by them... /facepalm. Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1384624 Share on other sites More sharing options...
zenmind Posted October 14, 2012 Author Share Posted October 14, 2012 Guys guys woah I am not making a scam or doing anything lol . My teacher uses a washington university CS course as the basis of her materials and the actual page I am writing is oddly created by her and it basically is a page to "buy your grades" . I understand the basis of why everyone is suspecting this the issue is the POST command would not/will not display the information entered on the html page on the PHP. Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1385193 Share on other sites More sharing options...
zenmind Posted October 14, 2012 Author Share Posted October 14, 2012 @Psycho it seems the lines dont display the user information typed in the HTML page and then processed and a correct output to the PHP page. Maybe It should have been wise to explain the code... #fail Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1385194 Share on other sites More sharing options...
PFMaBiSmAd Posted October 15, 2012 Share Posted October 15, 2012 I recommend reading posts #2, #3, and #4. Especially #4 since it gives a line of troubleshooting code that would display what, if anything, your form is posting to that page. Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1385212 Share on other sites More sharing options...
zenmind Posted October 15, 2012 Author Share Posted October 15, 2012 thanks for understanding and helping @PFMABiSmAd I will attempt what you said. Quote Link to comment https://forums.phpfreaks.com/topic/269362-displaying-the-user-information-using-post-method-undefined-variable/#findComment-1385227 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.