User Profile

Collapse

Profile Sidebar

Collapse
ArizonaJohn
ArizonaJohn
Last Activity: Jun 30 '09, 12:23 AM
Joined: May 27 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Code:
    print "<table class=\"navbar\">\n";
    print "<tr>";
    print "<td class='sitename'>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>";
    The CSS:

    Code:
    table.navbar {
       	margin-left:44px;
    	margin-top:0px;
    	text-align: left;
    	font-family:
    ...
    See more | Go to post

    Leave a comment:


  • Is there a way to change the CSS to make URLs display correctly in Firefox?
    See more | Go to post

    Leave a comment:


  • In FF, the source code says:

    Code:
    <td class='sitename'><a href="http://en.wikipedia.org/wiki/Miami" class="links2">en.wikipedia.org/wiki/Miami</a></td>
    However, the page only displays "en.wikipedia.o rg/wiki" in FF.

    The source code is the same in Chrome and IE8.
    See more | Go to post

    Leave a comment:


  • URLs display fine in Chrome and IE8, but not in Firefox 3.0.11

    Hello,

    My site prints out URLs in a table. In Chrome and IE8, the URLs look great. In Firefox 3.0.11, the URLs only display up until the second forward slash.

    So for example, "nytimes.co m/pages/world/americas/index.html" is just "nytimes.co m/pages" in Firefox.

    Any ideas why? The code is below.

    Thanks in advance,

    John

    Code:
    print "<td class='sitename'>".'<a
    ...
    See more | Go to post

  • ArizonaJohn
    started a topic ORDER BY variable DESC
    in PHP

    ORDER BY variable DESC

    Hello,

    I would like the code below to sort the echoed output by votes_up descending. I have added "ORDER BY votes_up DESC" to both queries, but the echoed output is still not sorting. Any ideas why it is not working?

    Thanks in advance,

    John

    Code:
    $result = mysql_query("SHOW TABLES FROM feather") 
    or die(mysql_error()); 
     
    while(list($table)= mysql_fetch_row($result))
    ...
    See more | Go to post

  • Nevermind.

    This gives me what I want:

    Code:
    $result = mysql_query("SHOW TABLES FROM feather") 
    or die(mysql_error()); 
    
    while(list($table)= mysql_fetch_row($result))
    {
      $sqlA = "SELECT COUNT(*) FROM `$table` WHERE `site` LIKE '$entry'";
      $resA = mysql_query($sqlA) or die("$sqlA:".mysql_error());
      list($isThere) = mysql_fetch_row($resA);
    ...
    See more | Go to post

    Leave a comment:


  • The code below is close. What it does is return the following:



    What I want is:



    How could I change the code to make it return what I want?

    Thanks,

    John

    Code:
    $result = mysql_query("SHOW TABLES FROM feather") 
    or die(mysql_error()); 
    
    while(list($table)= mysql_fetch_row($result))
    {
     $sqlA = "SELECT
    ...
    See more | Go to post

    Leave a comment:


  • ArizonaJohn
    started a topic Looking up column values for an array of tables
    in PHP

    Looking up column values for an array of tables

    Hello,

    In PHP, I have an array called $table_list[]. It contains a list of MySQL table names. Each one of these tables has a column called "site" and one called "votes_up."

    For each table in $table_list[], I would like to look up the value of "votes_up" when "site"=$ent ry.

    How could I do this using PHP and MySQL?

    Thanks in advance,

    ...
    See more | Go to post

  • ArizonaJohn
    started a topic list() query not working
    in PHP

    list() query not working

    Hello,

    When I run the code below when $entry = miami.com, I get the following error message:



    It looks like I'm not correctly defining $table. Any ideas how I could do that?

    Thanks in advance,

    John


    Code:
    $result = mysql_query("SHOW TABLES FROM feather") 
    or die(mysql_error()); 
    
    
    while(list($table)= mysql_fetch_row($result))
    ...
    See more | Go to post

  • ArizonaJohn
    started a topic MySQL SHOW TABLES

    MySQL SHOW TABLES

    Hello,

    In a MySQL database called "feather," I have a lot of tables, and each table has a column called "site."

    I'm trying to show all tables that contain a record equal to $entry in the column "site."

    How do I do that? I have some code below but I doubt it works.

    Thanks in advance,

    John

    Code:
    $data = mysql_query("SHOW TABLES
    ...
    See more | Go to post

  • Query works except when variable has apostrophe in it

    Hello,

    The query below works if $find is just a regular word with no special characters, and it even works if $find has a "%" in it or a "&".

    However, it does not work if $find has an apostrophe in it. Any ideas on how I can change the code to make it work if $find has an apostrophe in it?

    Thanks in advance,

    John

    Code:
    <?
    
    $find1 = urlencode($find);
    ...
    See more | Go to post

  • Permitting Special Characters in MySQL tablenames

    Hello,

    I would like to allow users to add tables to my database with special characters in the table names. The characters I would like to allow include #, &, *, and +.

    Below is my code which allows the users to create tables, and the name is the variable "$name". How can I allow them to use special characters for the table names?

    Thanks

    Code:
    if (isset($_POST['name']) &&
    ...
    See more | Go to post

  • Someone else told me to put backticks around the session variable and it solved the problem, so

    $q = "SELECT * FROM `{$_SESSION['find']}` WHERE id = $id";
    See more | Go to post

    Leave a comment:


  • AJAX call to a PHP/MySQL script failes if a dynamic table name has a space in it.

    Hello,

    Below I have some Ajax and the page it points to. This code works great if $_SESSION['find'] has no spaces in it (for example, if it is "elpaso"). However, if $_SESSION['find'] has a space in it (for example, "el paso"), then the Ajax fails.

    What can I do to make this Ajax work when $_SESSION['find'] has a space in it?

    Thanks.

    Ajax:
    Code:
    <?php
    ...
    See more | Go to post

  • ArizonaJohn
    replied to Session works, just not the first time
    in PHP
    Hmm. I use $find elsewhere as both a session and local variable and it works just perfectly.

    I tried reversing $_SESSION['find'] = $find; to $find = $_SESSION['find']; and it doesn't seem to make a difference.
    See more | Go to post

    Leave a comment:


  • ArizonaJohn
    replied to Session works, just not the first time
    in PHP
    Hi,

    Register globals in on.

    I have unset($_SESSION['find']); at the top of my index page because the user has the option of returning to it. In that case, I want to cancel the value of $find.
    See more | Go to post

    Leave a comment:


  • ArizonaJohn
    started a topic Session works, just not the first time
    in PHP

    Session works, just not the first time

    Hello,

    On my site, a user enters a value into a form, and if that value is not in my database, the code below is meant to give the user the message "The topic "value" has not been added. Add the topic "value"." When I pull up my site in Firefox and enter in a non-existent value for the first time, the message says "The topic "" has not been added. Add the topic ""." Then...
    See more | Go to post

  • ArizonaJohn
    started a topic Refreshing SESSION variable with an HTML form
    in PHP

    Refreshing SESSION variable with an HTML form

    Hello,

    I have an HTML form at the top of a page called tsearch18.php. This page uses "find" as a session variable. I would like to change the value of the "find" session variable each time a new value is entered into the HTML form. How do I do this?

    Thanks in advance,

    John

    Code:
    <?php
    session_start();
    
    $find = strip_tags($find);
    $find = trim
    ...
    See more | Go to post

  • Hi,

    I tried using &find={$_GET['find']}, and the variable is indeed being passed through. I can tell by the URL of the next pages.

    However, the results are still blank.

    Maybe "find" is the wrong variable for me to be passing through? After all, this is the result that I am breaking up into pagination:

    Code:
    $result=mysql_query("SHOW TABLES FROM sand2 LIKE '%$find%'")
    ...
    See more | Go to post

    Leave a comment:


  • Hi Prabirchoudhury ,

    Could you be more specific? What variable does not need a $_session?

    Thanks,

    John
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...