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

257 Like 26 Dislike
Previous php-forum Next php-forum
Other php-forum

Need help/w Page: 1,2,3,4 function!
So I have this code im working on where it's ment to display seperate pages having 20 logs each
I

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

Help Optimizing code
Good Morning,

I wrote a small import function for a website of mine and I know there has to b

PHP Programming error. Please help!
Hi there,

Am making a website for a friend and have encountered a problem that i need fixing

Simple MySQL query...
Hello,
How could I do a mysql query that does this: SELECT * WHERE date/time < 5minutes ag

PHP & MS Access - Line Break
Hey Guys!

I'm pulling records from an MS Access database and listing them using PHP and I'm r

Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s

POST into Array problem
Hi Chaps,

I have a repeat region, displaying rows of data: jobid, fromtable, translatorcharge

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash