This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
Help with MySQL and PHP

Hello everyone,

I have been creating a news site for a game, a fansite, and have recently migrated over to PHP/MySQL because HTML and CSS is too time consuming with the amount of information coming in from the game (creating each page, man!).

This is what Im Trying to do.

I am trying to create a PHP form, that connects with my database on bravenet. However, Im having a hard time. The form is created correctly, but when I click online, nothing happens. Here is the Form's URL www.simcountryworldnews.com/scwn_staff/admin/admin.php

The connecting code is:
if($submit)
{
$db = mysql_connect("sql#.bravenet.com", "User: from myPHP in Bravenet Database page ","password");
mysql_select_db("blah_1234567",$db);
$sql = "INSERT INTO ureport (entity, leader, entityname, world, category, subject, article)
VALUES ('$entity','$leader','$entityname','$world','$category','$subject','$article')";
$result = mysql_query($sql);
echo "Thank you! Information entered.n";
}
else
{
?>



General Information
Is this for a Country or CEO?:

Country or Enterprise

Leader Name:

Entity Name:

(ex: if country then "country name", if ceo then "enterprise name")

In which world does your country or enterprise exist?

Kebir Blue
Fearless Blue
White Giant
Golden Rainbow
Little Upsilon




Story Information
Please help us categorize your news for Simcountry players.
Does your news fit any of the following categories? (check all that apply)

War (attacks, wars, peace negotiations, threat of war; not for weapons sales)

Diplomacy (interactions between countries; not for ceos)

Trade (products for sale, actions between ceos and countries, embargos)

Economy (a country's economy, world's economy, enterprise assets, corporate news)

Alliance Activity (if this is about an alliance also)

Security Council (United Nations Security Council)

Natural Disasters



Story
Subject:

Article:







}
?>

Here is my problem
When I enter anything into the form, I get a blank page. Nothing happens. I check my database, and nothing was entered.

Do I have to install PHP to the bravenet server? If so, How do I do that? Am I using the wrong username? Im using the one from the MyPHPAdmin page "User: >>>!!THIS!!<<< via TCP/IP". blah_1234567 is my database name from the my account>database page, and "ureport" is the table name.

Ive tried to find help for days....what am I doing wrong?

Browser: Firefox

OS: Windows Vista PC

Re: Help with MySQL and PHP

Nvm, Ive fixed it.

Browser: Firefox

Re: Help with MySQL and PHP

Hi! I have read your post before you solved it yourself and thought you are very good this stuff.
Thus, i would appereciate if you helped me.

I am buiding a site on bravenet wizard but when i press publish the templates and everything i have done in the wizard are useless. Because i get redirected to another website of mine that i have build myself.

What can i do to configure or to see my templates (built in the wizard) in their own website page?

PS.SORRY FOR USING REPLY POST TO ASK

Browser: firefox