Jump to content

Pauls74462

Members
  • Content Count

    50
  • Joined

  • Last visited

Everything posted by Pauls74462

  1. Pauls74462

    Get data PHP

    Clicking email does not work.
  2. Pauls74462

    Get data PHP

    Below is a PHP code I found to get data from MySQL and show db info on a web page. What I like to do is to make the email link where I can click on it and send an email. What I need to know is what php line needs to be edited and how do I add the "mailto:" to the email address.The code live working can be seen at: http://softsevenorg.com/MySQL/GetTables.php <html><head><title>MySQL Table Viewer</title></head><body><?php$db_host = 'localhost';$db_user = 'root';$db_pwd = 'lptm42b';$database = 'sphinx';$table = 'spheres';if (!mysql_connect($db_host, $db_us
  3. Pauls74462

    Id reset

    The array sounds like a good option, but what is the code for it?
  4. Pauls74462

    Id reset

    Here is how I choose a random users, is there a better way?$result = mysql_query("SELECT * FROM MyTable"); $Choose_rows = mysql_num_rows($result); $Num2Use = rand(1, $Choose_rows);$result = mysql_query("SELECT * FROM Members where id = $Num2Use");
  5. Pauls74462

    Id reset

    I have a db and when I delete a row then my Id numbers get out of sink. How to I keep the rows in numeral order after delete of a rod have been done?I need the Id to be in numerical so I can do a random function.Paul
  6. Can you give me a sample code of the one step?
  7. Can someone tell me what is wrong with the below code?<?php// If file existsif file_exists("testFile.txt"); // Do somethingelse $ourFileName = "testFile.txt"; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fclose($ourFileHandle);?>
  8. Just at the time of the testing, I will have that table filled up data I hope in time.I later put some fake data in it to test, it works as wanted.
  9. Don't know if it will work, I only have 1 row in my db now, but with the 1 row it works. No sorting is needed.Thanks for all who posted help! $result = mysql_query("SELECT * FROM Members"); $num_rows = mysql_num_rows($result); $NewNum = rand(1, $num_rows);$result = mysql_query("SELECT * FROM Members where ID = $NewNum");
  10. I have the below code or at least a start. I need to select a random row <?php // Get db connectionsinclude ("config.php");// Make a MySQL Connection$link2 = mysql_connect( $dbhost, $dbuser, $dbpass)or die("Could notconnect: ".mysql_error());mysql_select_db($dbname) or die(mysql_error());// Query the database and get the count $result = mysql_query("SELECT * FROM Members"); $num_rows = mysql_num_rows($result); $NewNum = rand(1, $num_rows);$sql = "SELECT * FROM Members WHERE somefield='something' ORDER BY RAND() LIMIT 1"; // select random row?>
  11. How do I make a mouseover bold hyperlink: while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['id'] . "</td>"; echo "<td width='1000'>"; echo "<a href=" . $row['Domain'] . ">" . $row['Domain'] . "</a></td>"; //Bold mouseover link here echo "<td width='75'>"; echo "<p align='center'>" . $row['City'] . "</td>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['State'] . "</td>"; echo "<td width='25'>"; echo "<p align='cente
  12. Please give code sample, this css thing is all new!
  13. while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['id'] . "</td>"; echo "<td width='1000'>"; echo "<a href=" . $row['Domain'] . ">" . $row['Domain'] . "</a></td>"; // How do I make this link BOLD when the mouse in over? echo "<td width='75'>"; echo "<p align='center'>" . $row['City'] . "</td>"; echo "<td width='25'>"; echo "<p align='center'>" . $row['State'] . "</td>"; echo "<td width='25'>"; echo "<p align='center'>" . $row
  14. Would this make the link bold?h3 a:hover { text-decoration: bold; font-size: 1em;color:#800;}
  15. This is all new, can you give a sample code?
  16. I have a web page that gets the domain from the db postes it on the page and makes a hyper link.I like to find out how to make the URL bold when the mouse is moved over it: <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"--><title>Best Auto Sells</title></head><body><?phpinclude ("config.php");// Make a MySQL Connection$link2 = mysql_connect( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());if (!$link2) { die('Could not connect: ' . mysql_error()); }// echo "Connected to db ";// select the
  17. What is the redirect command after you submit the form?
  18. //Upercase first letter of city$capitalizeFirst = ucfirst("$city");$city = $capitalizeFirst; I found this code to convert "tulsa" to "Tulsa"But how do you convert "oklahoma city" to "Oklahoma City"where $city = city name field?
  19. No message about resending. I just submits it as if you pressed 'submit'. U know how to fix?
  20. did you reload the page, that is when it does a double entry.
  21. It does insert information in the db if you add it.How do I send you a PM here, I'll add you to the db so you can enter a url.
  22. How do I find out if it is or not?
  23. Look at http://bestautosells.com/
×
×
  • Create New...