ntgcleaner Posted December 17, 2009 Share Posted December 17, 2009 First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so I figured I could get this to work. So, my plan was to make a simple SQL server with a PHP bullitin board on it. No Problem, that's done. Now, I want to make a submit form and eventually work with GD2 to do a little bit of graphical stuff. I am working with templates on top of templates in this phpBB... of course.. So I copied a page and started to change the body of that page to reflect the simple form that I would like to make. The form is simple, it has a drop down box which is supposed to pull just 13 different names off of the server (which is already set up correctly on the server). Then under that drop down box there is an input box where you can type a name as well. After that, a submit button. Simple Here's the problem: 1. When I name it *name.php, and upload it and recache the website from the administration section, I only see a dropdown box with nothing inside of it to select and a sumbit button. 2. When I name it *name.html, and upload, recache, I see a dropdown box with nothing in it, the input box and the submit button. 3. When I make a regular php page without the template with the same code, I can see the dropdown box with all of the names from the server and the input box and the submit button. It all works, it just doesnt match the page. are these templates preventing this form to connect to the SQL server correctly? I would assume no, since the entire website is built on it. am I putting my "" $dbc = mysql_connect "" code on the right page? (which one should it be, if it should even be in there at all Here is the code for the form. Like I said, it is very simple. <form> <p align="center">Select your Army:<br> <select name="br_Armies"> <? $query="SELECT * FROM br_Armies ORDER BY br_Army_Name"; $r=mysql_query($query); while($row=mysql_fetch_array($r)){ ?> <option value="<? echo $row['ID'] ?>"><? echo $row['br_Army_Name'] ?></option> <? } ?> </select> </p> <p align="center">Please type your Personal Army / Chapter Name<br> <input type="text" name="firstname" /> <br /> </p> <div align="center"> <input type="submit" value="Submit your Army" /> </div> </form> I hope this forum is meant for things like this. I tried to search for this problem on google and other php sites, but I don't exactly know what to even search for! This seems like a pretty specific problem. I am extremely sorry if this has been answered before! Thank you all in advance! Quote Link to comment https://forums.phpfreaks.com/topic/185440-frustrated-php-newbie/ Share on other sites More sharing options...
gerkintrigg Posted December 17, 2009 Share Posted December 17, 2009 it might be. To be sure, re-define the db connection script just before you need to use it... make sure you use unique variables for the output, otherwise you might have a problem with the other functionality. If you're using PHP, I'd suggest that whatever page you're loading needs to have a .php extension. Next time, there's no need to tell us you're a newbie... most people are. Quote Link to comment https://forums.phpfreaks.com/topic/185440-frustrated-php-newbie/#findComment-979063 Share on other sites More sharing options...
sasa Posted December 17, 2009 Share Posted December 17, 2009 try to change short php tags change '<?' to '<?php' Quote Link to comment https://forums.phpfreaks.com/topic/185440-frustrated-php-newbie/#findComment-979246 Share on other sites More sharing options...
ntgcleaner Posted December 17, 2009 Author Share Posted December 17, 2009 Alright, Thank you for the quick responses! And thank you for easing my newness pain. I tried both of your guys suggestions and still not working. It really seems that these templates are preventing this from working. When I make a page by itself, it does everything fine, though it does not look like the page (which I guess I could do some photoshop work to make it look and act like it). When I add this code to the part of the template, that's when things don't work. I'll throw out the possibility of an .html page, as you said, and just focus on only the .php. With that in mind, this dropdown box does not pull the information from the server, which is a very unique name compared to all of the phpbb names on the DB. and also the input box and the submit button doesn't even show up! I am completely stumped. What kind of information should I be looking for on this? EDIT: I just tried linking it to a new database that was not attached to the phpbb database and same thing. It doesn't show up. Quote Link to comment https://forums.phpfreaks.com/topic/185440-frustrated-php-newbie/#findComment-979375 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.