Jump to content

Search the Community

Showing results for tags 'my sql'.

  • 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 4 results

  1. Hi I have tried and tried and tried again to get this to work in simple terms I have very little knowledge with PHP and even less with mysql I have a paid subscription and domain in order to learn more and I feel I have made ok progress so far then I realised how unsafe my current work is; here is my experience this far I created a site for a group of voluntary online game hosts where they can posts points from their tournaments in a forum and some info pages to go with this, however what I did was create a base template and style sheet and then an admin dashboard linked to individual forms to allow the group admin to edit the info pages they go to my form and enter the desired info and submit this then sends through and action file which posts the text and <BR> to a .txt file, then the connecting page reads the .txt file using the PHP code of " <? php include ( 'index.txt'); ?> yes you are seeing this correctly I have allowed a direct edit of text in a .txt file rather silly of me but I didn't realise how unsafe this was until now I guess its a good job I trust that the admin has no knowledge or skills in coding ok since all this I have created a DB in MySQL on my server, My server uses PHPMyAdmin I have create a DB named " mnvbcou1_content1 " and a table named " home " with rows " ID " and " home " what I am trying to do: I want my page to display the content of the table row home and a form once submitted to send to the table row home or if needed I can re make this DB if the names are not suitable I have tried to create the needed coding to make this work but for some reason this just will not work I have already added 2 rows to my table to try and make the page to display the content but it just is not working I got an error every time so I hope that someone out there is rather patient and is willing to help me learn how to do this correctly and safely, also this is a closed group website the address to this site is only known by a handful of none programmers I am mainly trying to make this work for my own personal knowledge and server safety please help me
  2. Hello, I have two different databases with each having one table. I wanted to display records from both databases in a single html page sort by Date. Both Database tables may have different columns. But some Columns names are same.Any idea on how to do this... Regards, Durgaprasad.
  3. Please help make this? ALL LINES FROM EACH OF THE 4 TEXT FILES MUST MATCH, SO IN FACT IF ALL IS READING LINE 3 FROM STARTING HTML THEN IT WILL IN FACT CHANGE BASED ON THE INFO FROM LINE 3 FROM THE OTHER TEXT FILE. ALL LINES MUST MATCH TO CREATE A CHANGE PAGE AND GIVE THE LOCATION OF THE NEW PAGE. There will be four TXT files (1) ChangeThisHtml.txt <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> <p>SUPERBASE</p> (2) EndingHtmlLocation.txt D:\index1.html D:\index2.html D:\index3.html D:\index4.html D:\index5.html D:\index6.html D:\index7.html D:\index8.html D:\index9.html D:\index10.html (3) StartingHtml.txt <p>SUPERNATURAL </p> <p>SUPERNATURAL1 </p> <p>SUPERNATURAL2 </p> <p>SUPERNATURAL3 </p> <p>SUPERNATURAL4 </p> <p>SUPERNATURAL5 </p> <p>SUPERNATURAL6 </p> <p>SUPERNATURAL7 </p> <p>SUPERNATURAL8 </p> <p>SUPERNATURAL9 </p> (4) StartingHtmlLocation.txt D:\index.html D:\index.html D:\index.html D:\index.html D:\index.html D:\index.html D:\index.html D:\index.html D:\index.html D:\index.html HTML FILE <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>SUPERBASE</title> </head> <body> <p>SUPERBASE</p> </body> </html> pages1.zip
  4. Hi I am trying to get data from a sql database based on who logs in. I am having problems getting it to display. I am not sure how to ge this to look at the query piece. I have tried to do it on a sperate PHP page as well as with in the same PHP file. <!--fetch tha data from the database while ($row = mysql_fetch_array($result)) echo "--> <form action="Dropdown_new.php" target="showhere"> <table width=844 cellspacing=2 cellpadding=2 border=2> <tr> <td bgcolor=#000000 width=150><font face=tahoma color=white>ID: {$row['Member_ID']}</font></td> <td width=150><font face=tahoma>Bank: {$row['Bank']}</td> <td width=150><font face=tahoma>Reward 1: {$row['Reward_1']}</td> <td width=150><font face=tahoma>Reward 2: {$row['Reward_2']}</td> <td width=150><font face=tahoma>Reward 3: {$row['Reward_3']}</td> </tr> </table> </form> <iframe width="800" height="100" name="showhere" marginheight="0" marginwidth="0" frameborder="0" scrolling="no"> </iframe> Here is the query piece do I need to name this and then call that name below to get it to display? <?php $username = "pdogclan"; $password = "topdog0208"; $hostname = "localhost"; //connection to the database $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); echo "<font face=tahoma color=#ff000><b>Connected to MySQL</b></font><br><br>"; //select a database to work with $selected = mysql_select_db("pdogclan_points",$dbhandle) or die("Did this change"); // Formulate Query $memid = mysql_real_escape_string($_COOKIE['username']); $query = sprintf("SELECT Member_ID, Bank, Reward_1, Reward_2, Reward_3 FROM Points_Rewards WHERE Member_ID = '$memid'") or die("Could Not Formulate the Query"); //execute the SQL query and return records $result = mysql_query($query); // Check result // This shows the actual query sent to MySQL, and the error. Useful for debugging. if (!$result) { $message = 'Invalid query: ' . mysql_error() . "\n"; $message .= 'Whole query: ' . $query; die($message); } ?>
×
×
  • 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.