Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. http://css-tricks.com/snippets/php/find-urls-in-text-make-links/
  2. you missed the answer, let me highlight it in red. "xxxxxx", "a3165211_Forum");
  3. Is very possible, show your current code. You can just merge them something like this. $location = "Images/"; $image_name = "123.jpg"; $final_location = "$location$image_name";
  4. Wordpress has the ability to do multiple subdomains, even multpile sites per user. http://wordpress.org/download/ add this line to wp-config.php file to enable it define('WP_ALLOW_MULTISITE', true); Also look into buddypress http://buddypress.org/
  5. change this: <?=$pagination?> to this: <?php echo $pagination;?>
  6. It works now paul, just saw it redirect me to no www.
  7. did you restart apache after the change? Anyway, in your panel is also ways to handle the www and also any wildcards for subdomains using a *
  8. I should also mention this should be above if not already there. RewriteEngine On
  9. www was an oldschool way thsat browsers needed to access urls, meaning "world wide web" it's actually considered a subdomain in htaccess do a rewrite rule RewriteCond %{HTTP_HOST} ^www\.paulryanmc\.co.uk$ [NC] RewriteRule ^(.*)$ http:/paulryanmc.co.uk/$1 [R=301,L]
  10. It's just like anything else, only the people who are noteworthy get attention. There must have been millions of people throughout time for each field, but only a few are remembered for what they did.
  11. what's this? <? all_states; ?> If that's php it should echo Is it a variable? <?php echo $all_states; ?> You should also not be using short tags like <? and use <?php instead
  12. if user not 10000 OR user not equal to user echo result in either condition if user not 10000 AND user not equal to user echo result if both conditions are met so if you do OR and user is user it would always show image even if userid is 10000
  13. <?php echo "<td>"; echo $row['userID']; if ($row['userID'] != 10000 && $row['userID'] != $userID) { echo "<a href=\"#\" class=\"ask\"><img src=\"images/trash.png\" class=\"delete\" alt=\"\" title=\"\" border=\"0\" id=\"".$row['userID']."\" /></a>"; } echo "</td>"; ?>
  14. If have more can do elseif if($countrycode =="GB") { header("Location: http://www.uk.mydomain.com"); } elseif($countrycode =="AU" || $countrycode == "AUS") { header("Location: http://www.au.mydomain.com"); } else { header("Location: http://www.us.mydomain.com");//so this would be default if country code not found }
  15. Just have the 2? if($countrycode =="GB") { header("Location: http://www.uk.mydomain.com"); } else { header("Location: http://www.us.mydomain.com"); }
  16. Wait, maybe this should be an AND for logic? Want to make sure it's their user id, but not 10000 <?php echo "<td>"; echo $row['userID']; if ($row['userID'] != 10000 && $row['userID'] == $userID) { echo "<a href=\"#\" class=\"ask\"><img src=\"images/trash.png\" class=\"delete\" alt=\"\" title=\"\" border=\"0\" id=\"".$row['userID']."\" /></a>"; } echo "</td>"; ?>
  17. <?php echo "<td>"; echo $row['userID']; if ($row['userID'] != 10000 || $row['userID'] != $userID) { echo "showing"; } echo "</td>"; ?>
  18. http://www.php.net/manual/en/language.operators.comparison.php
  19. http://www.phpfreaks.com/forums/index.php?topic=37442.0 http://php.net/manual/en/function.header.php Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file. Do not echo or include anything that will echo before a header redirect.
  20. For a start, nothing should be output to the browser before a header redirect. Absolutely nothing.
  21. I would see if there is any swelled or leaking capacitors on the motherboard. Also it could very well be a power supply issue. Some possible suggestions. Try it with less devices connected, will draw less power and also may find a faulty one. Apply some arctic silver paste to the cpu and also the gpu's. Run in a cooler environment to test.
  22. I run some servers on windows machines due to linux file limits and being able to take snapshots in multiple ways. I recently loaded Windows 7 pro 64 bit For the server I use AppServ, could just as well be WAMP or similar. In the past I've used exec, also psexec in the pstools suite under server 2003 and also xp pro http://technet.microsoft.com/en-us/sysinternals/bb896649 Here's what usually have to do to get the psexec working place PsExec.exe into the windows\system32 folder click on PsExec.exe and accept the EULA agreement add PATH for psexec with exact location to the system enviroment go to services.msc and set apache to interact with desktop, restart apache Now under windows 7 with full admin rights for everything, no UAC, the above method does not work. Is an additional workaround must do. set apache service to manual stop apache service Browse to C:\AppServ\Apache2.2\bin\httpd.exe or equivalent. Create a shortcut for httpd.exe right click httpd.exe shortcut and select properties, set to run minimized go to start, in the search type C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup (this is a hidden file) copy the httpd.exe shortcut to the startup folder you can restart the server or click the shortcut for testing here's a sample code to see if it now works <?php $WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run("notepad.exe", 7, false); ?> If anyone has any other solutions please respond.
  23. <?php require_once('auth.php'); ?> <?php //Start session session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>View Users</title> <link href="loginmodule.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { font: 11px Verdana, Arial, Helvetica, sans-serif; color: #666666; margin: 0px; padding: 20px 10px 0px; } /* general style */ .list{ margin:0; padding:0; width:840px; } .list li{ list-style: none; margin:2px 0; overflow:hidden; border-bottom:1px solid #eee; } .entries span, .heading span{ display:block; width:155px; /* (~width of list) / 5 keep in mind the boxmodel*/ float:left; padding-left:12px; border-right:1px solid #eee; line-height: 30px; height:30px; } .heading span{ background: #CAE8EA; } /* entries */ </style> </head> <body> <h1>View Users</h1> <a href="member-profile.php">Orders</a> | <a href="users.php">Users</a> | <a href="logout.php">Logout</a> <?php //Include database connection details require_once('config.php'); //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); $sql = mysql_query("SELECT * FROM newUsers2 ORDER BY member_id ASC"); $id = 'member_id'; $fname = 'firstname'; $lname = 'lastname'; $login = 'login'; echo '<ul class="list">' ; echo '<li class="heading">'; echo '<span class="id">ID </span>' ; echo '<span class="firstname">FIRST NAME </span>' ; echo '<span class="lastname">LAST NAME </span>' ; echo '<span class="login">LOGIN </span>' ; echo '<span class="userType">ADMIN RIGHTS</span>'; echo '</li>' ; while ($rows = mysql_fetch_assoc($sql)){ if($rows['userType'] == 1) { $userTypeValue = "YES"; } else { $userTypeValue = "NO"; } echo '<li class="entries">' ; echo '<span class="id">' .$rows[$id]. '</span>' ; echo '<span class="firstname">' .$rows[$fname]. '</span>' ; echo '<span class="lastname">' .$rows[$lname]. '</span>' ; echo '<span class= "login">' .$rows[$login]. '</span>'; echo '<span class="userType">' .$userTypeValue. '</span>' ; echo '</li>' ; } echo '</ul>' ; ?> </body> </html>
  24. change this: print "<option value=\"age\"> $age</option>; to this: print "<option value='age'> $age</option>";
  25. Does $rows[$userType] have a value if echo it anywhere in your while loop? Is it exactly userType in your database?
×
×
  • 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.