Jump to content

garydt

Members
  • Posts

    321
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

garydt's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. gary.php is the second piece of code.
  2. Hi, I've uploaded my website to the server and I'm getting this error:- Parse error: syntax error, unexpected T_VARIABLE in /home/c/h/chichesterag/public_html/Connections/gary.php on line 9 This is the first 9 lines of code:- <?php session_start(); ?> <?php require_once('Connections/gary.php'); ?> <?php ini_set ("display_errors", "1"); error_reporting(E_ALL); $gary = mysql_connect("localhost", "root") or die("Error connecting to database<br /><br />".mysql_error()); mysql_select_db("people") or die("Error selecting database<br /><br />".mysql_error()); This is my connecting code:- <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_gary = "localhost"; $database_gary = "chichesterag"; $username_gary = "chichesterag"; $password_gary = "xxxxxx"; $gary = mysql_pconnect($hostname_localhost, $username_chichesterag, $password_xxxxxx) or trigger_error(mysql_error(),E_USER_ERROR); ?> The server's owner doesn't know what the problem is so I'm hoping someone here can help. Thanks, Gary
  3. the database is called people but the online server hasn't any options where i can create a database.
  4. Thanks. So how do i use that program to connect to green on Red's server?
  5. I'm hosted with Green on Red IT Ltd
  6. Clicking on mysql administrator i get- List Tables Create Table Export Data Run SQL and Table List The tables within your database are shown below. Table Records Action newtablee 0 Browse Search Properties Insert Drop Empty Rename Add Create New Table
  7. When I click on mysql i get mySQL mySQL is a powerful database server. mySQL databases can be integrated into web pages opening opportunities for advanced data driven sites and ecommerce. mySQL is currently set-up on this account. Change mySQL Password mySQL Administrator Remove mySQL
  8. I have a cpanel with these options Security FrontPage SSL Error Page CGI Scripts mySQL Dialup Accounts DNS ADSL SubmitXtra
  9. On the server it has a run sql where I can type in commands. Do I need to type in commands and, if so, what?
  10. Now I've put this- <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_gary = "localhost"; $database_gary = "people"; $username_gary = "new"; $password_gary = "garyt"; $gary = mysql_pconnect($hostname_gary, $username_gary, $password_gary) or trigger_error(mysql_error(),E_USER_ERROR); ?> and now i get- Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'new'@'localhost' (using password: YES) in /home/c/h/chichesterag/public_html/Connections/gary.php on line 9 Fatal error: Access denied for user 'new'@'localhost' (using password: YES) in /home/c/h/chichesterag/public_html/Connections/gary.php on line 9 What have I got to do now? Sorry to keep asking.
  11. i uploaded the connections folder and now i'm getting this- Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/c/h/chichesterag/public_html/Connections/gary.php on line 9 Fatal error: Access denied for user 'root'@'localhost' (using password: NO) in /home/c/h/chichesterag/public_html/Connections/gary.php on line 9 This is line 9- $gary = mysql_pconnect($hostname_gary, $username_gary, $password_gary) or trigger_error(mysql_error(),E_USER_ERROR);
  12. I'm sorry, i'm confused. How do I connect the webpage to the table online without haviing a database? on my pc the mysql settings are connection - gary host address - localhost user name - root the database is called people. Don't i need to have these settings on the online server?
  13. Just to let you know, when i try the webpage i get- Warning: require_once(Connections/gary.php) [function.require-once]: failed to open stream: No such file or directory in /home/c/h/chichesterag/public_html/index.php on line 2 Fatal error: require_once() [function.require]: Failed opening required 'Connections/gary.php' (include_path='.://lib/php') in /home/c/h/chichesterag/public_html/index.php on line 2
  14. This is part of my code- <?php require_once('Connections/gary.php'); ?> <?php $gary = mysql_connect("localhost","root") or die("Error connecting to database<br /><br />".mysql_error()); mysql_select_db("people") or die("Error selecting database<br /><br />".mysql_error()); $query_Recordset5 = "SELECT * FROM newtable"; It works fiine on my local pc/server. However when I went onto the online server to setup the database and table their mysql administrator only let me setup the table and not the database properties. I've connected support about creating the database properties but they don't seem to have a clue about it. What can I do?
  15. That works, thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.