Jump to content

computermax2328

Members
  • Posts

    281
  • Joined

  • Last visited

Everything posted by computermax2328

  1. I was directed to phptherightway.com by several professional php programmers
  2. Hello All, I am having some trouble with my mobile stylesheets. They aren't loading when I look at my site on mobile devices. This is what I have now. <link rel="stylesheet" type="text/css" href="../css/master.css" media="screen"/> <link rel="stylesheet" type="text/css" href="../css/article.css" media="screen"/> <link rel="stylesheet" type="text/css" href="../css/mod.css" media="screen"/> <link rel="stylesheet" href="../css/mobile.css" media="only screen and (max-device width:480px)"/> The mobile stylesheet pretty much says to hide the right floating column and give the content a 100% width and the wrapper a 90% width. I am not really familiar with @media or @import. What do I need to do??
  3. Set the default padding and margin for all elements to zero. You can do this with the code below. It is always the first thing I do on all of my master.css sheets. For some reason chrome makes a default margin and padding. * { margin: 0px 0px; padding: 0px 0px; }
  4. Hello All, I was wondering if anyone could tell me how to equally distribute left and right margin to a navigation bar element built with an unordered list. I want to be able to add elements to the nav bar using PHP and have the margin between the elements on the the left and right side be equally distributed. Thanks in advance.
  5. Hello all, I am new to Joomla! and I am trying to wrap my head around some of the basic concepts of creating Joomla! template from scratch. I looked around online, but I haven't found anything about this question yet. Maybe I am not looking in the right place. I am having a hard time wrapping my head around the idea of inside pages in a Joomla! template when it comes to file structure. I am creating a news website and there will be three different kinds of inside pages, category home, article page and a search results page. All of which need to have different module and banner spaces. If I were to not use Joomla! and code a site from PHP I would use variables in the URL for an article.php to select an article out of a mysql database using the variables in the URL. I don't really understand if that is the method that is used with Joomla! I was thinking to maybe create a article.php page that queries the Joomla! content database and selects all the information from the database with the URL variables and the has modules built in the sidebar. Like I said, I am new to this.
  6. Hello All, I was wondering if anyone had some fluid techniques for nav bars. I want to evenly distribute each li in the nav bar and have them be fluid. Structure like the following: <nav id="nav" class="width"> <div id="slide" class="body"> <ul id="bar"> <li><a href="#">NEWS</a></li> <li><a href="#">SPORTS</a></li> <li><a href="#">OPINION</a></li> <li><a href="#">LIFESTYLES</a></li> <li><a href="#">A&E</a></li> <li><a href="#">BLOG</a></li> <li><a href="#">ABOUT</a></li> </ul> </div> </nav> the width class is 100% and the body is 80% centered with the margin 0px auto. I need to know the padding for each li to make it fluid and evenly distributed through the ul bar. Thanks in advance!
  7. "==" worked. Good call. Why didn't I think of that??
  8. I will give the "==" a try. As for echoing the value, I have and it is always the same. I will report back
  9. Hello All, First let me say, happy holidays! Second, I am glad to see that you are all still here. I am having trouble passing a variable through the url, getting it and then determining the correct query with it. For example: $find = $_GET['x']; if ($find = 'y') { sql = "SELECT * FROM table1"; } if ($find = 'z') { sql = "SELECT * FROM table2"; } mysql_query($sql, $connection); When I do this and then change the variable in the url it just takes the information from the first if statement. $find if always equal to "y". Any ideas??
  10. It says that you can collaborate or compete. In the image on the page it shows on city sending energy to the others. Hmmm I guess you can work out a trade deal. I send you power you send me water kind of deal. http://www.simcity.com/en_US/game/info/multiplayer Can't wait to find out!
  11. I wonder if there is any incentive to work together. For example, in this video you see the player buying new land to power his city. I wonder if there is any incentive for someone else to create a power city to power someone else city?? This looks awesome though. I love the building editions idea. On a side note, I am going to need to start saving up for a new computer with a little extra power.
  12. I wish that my error log was working properly to tell me that. All I got was an HTTP 500 error. HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
  13. Hey Everyone, Could someone find the error in this? My log isnt working and I can't stare at it anymore. The include file has nothing wrong with it. It is my functions file. Can't spell functions without FUN! include("../fun/fun.php"); if ($_POST['announce']) { $first = mysql_real_escape_string($_POST['first']); $last = mysql_real_escape_string($_POST['last']); $email = mysql_real_escape_string($_POST['email']); $ann = "INSERT INTO members ('first', 'last', 'email') VALUES ('$first', '$last', '$email')"; $annq = mysql_query($ann $connection); if ($annq) { header("Location:../pages/annoucements.php"); } else { echo "Query failed " . mysql_error(); } } if ($_POST['contact']) { $first = mysql_real_escape_string($_POST['first']); $last = mysql_real_escape_string($_POST['last']); $email = mysql_real_escape_string($_POST['email']); $line = mysql_real_escape_string($_POST['line']); $con = "INSERT INTO contact ('first', 'last', 'email', 'comment') VALUES ('$first', '$last', '$email', '$line')"; $conq = mysql_query($con $connection); if ($conq) { header("Location:../pages/contact.php"); } else { echo "Query failed " . mysql_error(); } } else { header("Location:../pages/index.php"); } Thanks in advance!
  14. Ideally, the two MYSQL databases would have similar structure, but the contents database would be different. Anything on how to set up a remote MYSQL database??
  15. I was just using a blog as an example. Well would it be easier to query your own database and build off of that or query their database and build off of theirs. For example, if there are 3 blogs, blog 1, blog 2 and my blog and blog 1 and 2 are their own unique content and I wanted my blog to be content from both of their blogs. But remember that the blogs they are using are a part of a system that I built for them. I would prefer to query my own database and connect to their database, but what if they are using another host?? Is this making sense??
  16. Hello All, I haven't been here in a while. It has been a busy semester. Haven't gotten a lot of time to practice coding in a while, but this question did cross my mind this morning for a project I am working on. Is there a way to connect to a database that is not the host. For example, say I was to create a blog with PHP and I gave that system to multiple users, but I wanted to collect all of the posts from all of the blogs in my database. So each blog has it's own database and different hosts, but I have my own that collects all of the posts and content. Any ideas?? Thanks!
  17. The process would be identify the table, identify the column names and query those columns. The problem is that the tables are all different. The data in the table has a child relationship to another table with information about the topic. So for example there is a table called education that has information about education, but there is another table that I am trying to query called education data. education and labor have the same table structure, but education data and labor data have a different structure because there is different data for both of them. Make sense??
  18. Hello All, Having some trouble with this loop. What I am trying to do is to fetch each column name from a database, then query the database based on that column name, loop around and do it again and finally stop after the last column $data = "SELECT * FROM $tabledata"; $dq = mysql_query($data, $connection); $add = 0; while ($dq) { $column = mysql_field_name($dq, $add) $find = "SELECT * FROM $tabledata"; $fq = mysql_query($find, $connection); while($fr = mysql_fetch_array($fq)) { $fd = $fr['$column']; } $add++; if ($column = empty()) { $add = 0; } } I can tell you that $tabledata does exist and mysql_fetch_field does work with a zero in it. It returns the first column if I echo it. Any suggestions??
  19. No phpinfo(). Bastards said they ran PHP 5
  20. at the end of your query your () and "" are out of order. Your 'or die' is inside of your query and your "" are messed up. Try this: mysql_query("INSERT INTO uinfo (uid,address,city,county,zip,homephone,cellphone,carrier,texts,dob,dlnumber,dlstate,languages,ename,relationship,dayphone,evephone,employer,position,waddress,wcity,wcounty,wzip,emergency,memployer,choice1,choice2,choice3,interest,interestedposition,travel,distance,length,transport,cred1,cred1num,cred1state,cred1expire,cred2,cred2num,cred2state,cred2expire,cred3,cred3num,cred3state,cred3expire,cred4,cred4num,cred4state,cred4expire,cred5,cred5num,cred5state,cred5expire,hear,contract,annual) VALUES ('$uid’,'$address’,'$city’,'$county’,'$zip’,'$homephone’,‘$cellphone’,‘$carrier’,‘$texts’,‘$dob’,‘$dlnumber’,‘$dlstate’,‘$languages’,‘$ename’,‘$relationship’,‘$dayphone’,‘$evephone’,‘$employer’,‘$position’,‘$waddress’,‘$wcity’,‘$wcounty’,‘$wzip’,‘$emergency’,‘$memployer’,‘$choice1’,‘$choice2’,‘$choice3’,‘$interest’,‘$interestedposition’,‘$travel’,‘$distance’,‘$length’,‘$transport’,‘$cred1’,‘$cred1num’,‘$cred1state’,‘$cred1expire’,‘$cred2’,‘$cred2num’,‘$cred2state’,‘$cred2expire’,‘$cred3’,‘$cred3num’,‘$cred3state’,‘$cred3expire’,‘$cred4’,‘$cred4num’,‘$cred4state’,‘$cred4expire’,‘$cred5’,‘$cred5num’,‘$cred5state’,‘$cred5expire’,‘$hear’,‘$contract’,‘$annual’") or die (mysql_error());
  21. Your mysql_error after the query has too many (). Take one off of the end. Tell me if that helps, I am going to look more into it.
  22. Hello All, So I signed up for some free web hosting to have a server to test some PHP on. The server isn't running my PHP script. I created a page with a form and of course some PHP script to accommodate the form, but the page went blank when I ran the page. Then I took the PHP our completely and the page ran the HTML and CSS. What is up with that??
  23. No! What I need to do is identify the column names before I can query the table. Then use the results of that first query to query the content of the table. Something like.... $data = "SELECT * FROM '$tabledata'"; $dq = mysql_query($data, $connection); while($dr = mysql_fetch_field($dq)){ $rowh = $dr->name; echo $rowh; } Maybe to get the column names??
  24. Is there a way to maybe could identify all of the columns in a table and then get them as an array??
  25. I am not the best with foreach. Foreach $row??
×
×
  • 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.