Frustrated php Newbie
Posted on
16th Feb 2014 07:03 pm by
admin
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.
Code:
<form>
<p align="center">Select your Army:
<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
<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
No comments posted yet
Your Answer:
Login to answer
257
26
Other forums
Receive Rosettanet Message to SAP 4.6c
Dear all ,
My customer will send the PO details by rosettanet message , Is it
Help With editting and deleting form
Hallo !!
So look at this image :
http://img194.imageshack.us/img194/8272/snapshot5f.pn
split string
Hi all
i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would
MySQL query problem
When I try to run the following piece of code, I get this error:
QuoteWarning: mysql_query(): sup
Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I nee
PHP doesn't send my mail
Hi all, I found this and used it to send mail. Simple contact form with some required fields. The va
Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.
How to login with SAPCPIC userid
I have changed the Password for SAPCPIC in Development Server for 000,001 and 100 client.
But w
Inserting a check in checkbox from array value
Hello all,
I have a bit of code that works for a select option box, but does not work for my chec
How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time som