Jump to content

Search the Community

Showing results for tags 'php html button'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Ok here it goes guys let me explain what I want to do. I am writing a PHP script built into a HTML file. The page will have a series of tables. The fist table will have be were the user inputs the required information to connect to there mysql database. at the bottom of the table will be a button with the onclick action set to call my php script to connect to the data base. Once connected I want data saying connected successfully or the error messges put into the table data fields marked in red below. Button is in blue. do I put the php script with in the <td> I want the respose to? Making sure it echo's the html tags needed? <tr><td align="right">Database host: </td><td> <input type="text" name="host"/></td></tr> <tr><td align="right">Database name:</td><td> <input type="text" name="dbname"/></tr> <tr><td align="right">Username:</td><td><input type="text" name="username"/></td></tr> <tr><td align="right">Password:</td><td><input type="password" name="password"/></td></tr> <tr><td>out put from the php script that connects to the database and makes sure its connected to the right database</TD</tr> <tr><td><button ---- to call the php function to connect to the data base/></td></tr> This is the code I have now but I'm not sure if this will work. I'm not sure how to reference the data in the input fields, to the peramiters passed to the function. Can someone shed some light?? Thanks <div id="database"> <table border = "1" align="center" cellpadding="10"> <tr> <td align="right">Zen-Cart Database Name:</td><td><input type="text" name="dname" /></td><td align="right" >Database Table Prefix(no spaces):</td><td><input type="text" name="prefix"/></td> </tr> <tr> <td align="Right">Database Username:</td> <td><input type="text" name="Uname"/></td> <td align="right">Password:</td> <td><input type="password" name="pass"/></td> </tr> <tr> <td align="right">Database host:</td><td><input type="text" name="host"/></td> <tr> <?php Function dbconect($host,$dbname,$Un,$pass,) { mysql_connect($host,$Un,$pass) or die (my_err()); echo("<td>Connected to your mysql database!</td>"); mysql_select_db($dbname) or die (mysql_error()); echo('<td>Connected to My Sql database name ' . $dbname . '</td>); } ?> </tr> <tr><td> </td><td colspan="2"><button type="button onclick="dbconnect(host,dname,Uname,pass)">Test Connection</button></td></tr> </table> </div>
×
×
  • 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.