jadebabe Posted August 23, 2007 Share Posted August 23, 2007 Hello all, I have a little situation here. I have to finish a project by tomorrow but had an accident which caused me some temporary memory loss... The thing is that i need to connect a web form to a database, and generate reports from what is sent in those forms I'm looking for some scripts like sylex php forms / reports and they wont run on my website. I need help, and.. i honestly dont want anyone else to get a better mark than me. Can you help me with some ideas, or scripts that can do such job for me? I appreciate it! Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/ Share on other sites More sharing options...
trq Posted August 23, 2007 Share Posted August 23, 2007 We don't do homework. If you have specific problems, post your problematic code and a description of the problem, otherwise, your on your own. Whatever mark you get needs to be reflected by how much effort you have put in. Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/#findComment-332126 Share on other sites More sharing options...
jadebabe Posted August 23, 2007 Author Share Posted August 23, 2007 ok i have concrete questions i wasnt looking for anyone to do my homework but help me out with some suggestions. i know i can find scripts to generate reports from a database but i just need proper orientation. Anyway I installed my form whith the corresponding form processor and after filling it to test it it shows this message: Parse error: syntax error, unexpected T_STRING in /home/os000332/public_html/srcf/processor.php on line 32 i checked line 32 which reads: En caso de haber seleccionado "Otro", Especifique:: " . $_POST['field_11'] . " which translates to> In case of selecting Other, Specify Its just an "if other please specify" text area after some radio buttons. How do i correct that? shall i just delete it from the form? I appreciate your patience i am a rookie Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/#findComment-332293 Share on other sites More sharing options...
Daleeburg Posted August 23, 2007 Share Posted August 23, 2007 First off we need to see some more code to make sure this is right, but if i had to guess it would say it has something to do with the "Otros" and that you really need to escape the slashes (\") so it would be nado \"Otro\", Especifique:: Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/#findComment-332302 Share on other sites More sharing options...
jadebabe Posted August 23, 2007 Author Share Posted August 23, 2007 Oh you are right!. Well, i have another question, i would like to assign a specific table.. so far i've done this: $link=mysql_connect("localhost","---supresed---","----passw---"); mysql_select_db("os000332_srcf"); if(!$link) die ('Could not connect to database: '.mysql_error()); mysql_select_db($db_name,$link); $query = "INSERT into `".$db_table."` (field_1,field_2,field_3,field_4,field_5,field_6,field_7,field_8,field_9,field_10,field_11,field_12,field_13,field_14,field_15,field_16,field_17,field_18,field_19,field_20,field_21,field_22,field_23,field_24,field_25) VALUES ('" . $_POST['field_1'] . "','" . $_POST['field_2'] . "','" . $_POST['field_3'] . "','" . $_POST['field_4'] . "','" . $_POST['field_5'] . "','" . $_POST['field_6'] . "','" . $_POST['field_7'] . "','" . $_POST['field_8'] . "','" . $_POST['field_9'] . "','" . $_POST['field_10'] . "','" . $_POST['field_11'] . "','" . $_POST['field_12'] . "','" . $_POST['field_13'] . "','" . $_POST['field_14'] . "','" . $_POST['field_15'] . "','" . $_POST['field_16'] . "','" . $_POST['field_17'] . "','" . $_POST['field_18'] . "','" . $_POST['field_19'] . "','" . $_POST['field_20'] . "','" . $_POST['field_21'] . "','" . $_POST['field_22'] . "','" . $_POST['field_23'] . "','" . $_POST['field_24'] . "','" . $_POST['field_25'] . "')"; mysql_query($query); mysql_close($link); How can i specify a table there? i am not very familiar with these things since i skipped classes after the accident but i really want a chance so i can keep up with the course. If you could also recommend literature on the subject .. Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/#findComment-332310 Share on other sites More sharing options...
Daleeburg Posted August 23, 2007 Share Posted August 23, 2007 im not sure where anwserinng a valid question ends and doing homework begins, but this has to be awfully close. did you write this code yourself, or where did you find this code? Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/#findComment-332319 Share on other sites More sharing options...
Asperon Posted August 23, 2007 Share Posted August 23, 2007 sigh...kids Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/#findComment-332325 Share on other sites More sharing options...
Jessica Posted August 23, 2007 Share Posted August 23, 2007 Are there really that many classes that teach PHP? Just a few years ago my HS made the switch from C++ to Java, and my university never offered any PHP classes. I understand we don't do homework for people, but is it that often that someone has PHP homework? How can someone get "better marks" than you if it's not homework? And what class is it for?> Quote Link to comment https://forums.phpfreaks.com/topic/66372-desperate-rookie-needs-help/#findComment-332339 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.