Jump to content

computermax2328

Members
  • Posts

    281
  • Joined

  • Last visited

Everything posted by computermax2328

  1. Hey All, I was wondering if there was a way to echo all the rows in a database table without having the fetch them. Pretty much, I have a group of tables that need to go individually on the same page, but display on the page according to different variables in the url. Displaying the content on the page according to the url works fine. I just need to figure our this one part. Something like this without the fetch where it is indicated. $table = $_GET['table']; $query = "SELECT * FROM $table"; $go = mysql_query($query, $connection); # I need to do without the code from here... while($row = mysql_fetch_array($go)) { $name = $row['name']; } # to here, but with the while loop in it....... echo "<li>$name</li>"; The problem is that the tables are for different issues, but the different issues have different data to back them up, for example: labor rates and education scores. They are both two issues, but they have two different sets of data, which means they have different columns in the table..... Thanks in advance,
  2. Hello All, I have an upload script that I use to upload a photo to a folder and then save the file path to a database. Then I query the database to get the photo and put it where I want on my webpage. The question is what kind of technique should I best practice for outputting the images. More of less, I need them to all be the same shape in the similar containers, for example 400px by 300px, but need the container to take into consideration that the photos may be different aspect ratios or vertical as opposed to horizontal. Any suggestions??
  3. So you are saying that a lot of web developers with put their queries right on the page where they have to query?? That is how I was taught to do it and I always saw it as unsafe. I did a little research on DAL, but I really can't find anything on how to do it. Any suggestions??
  4. So where does MYSQL Queries play in this?
  5. So do you have a suggestion about how I could store my header and footer or am I already doing it right? I mean it works, I just want to know if I am doing it right.
  6. Alright, so overall storing and reusing code that you are going to need over and over again in a website. The tables example was a good example and I appreciate your extended explanation. Another question I have about it is can you store your html in it?? For example say I want to save the html of my banner, nav bar and footer, so that I can just reuse them over and over again on each individual page. The method I was taught was to use save that code in an php file and include or require it on the pages that you need it in. include('includes/header.php');
  7. Hey Guys, For the past view nights I have been watching videos and such about learning object oriented PHP. I don't understand when to use it. Can someone give me a simple example of when to use it?
  8. Not to step on your toes, but if that is true why does that work? I do it all the time.
  9. I was going to say, do you have the write file path. I always keep my pages in a lower folder than my index. So mine would look like: header('Location:../index.php');
  10. I bought a PNY 8GB for $10. It is small and shaped kind of like a Lego brick. Mine is blue and white. It has a little attachment on the top so that when you take off the cap you can attach it to the bottom. It is made of rubber and although it is small, I have yet to lose it.
  11. They have a PHP command for everything. I love PHP! In the simplest form, something like this?? $email = $_GET['email']; if(filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE) { echo "This is not a valid email"; } else { mail($email, "Please Validate"); } I understand there are no headers or message.
  12. Right! And it email input isn't supported by all browsers. Back to square one
  13. I looked up email validation and html5 has and input type for email. I think I am going to look into that before I look into regular expressions
  14. Hello All, If I have a newsletter process script with name and email, is there a way to identify if the email is an email address? For example johndoe@gmail.com. I kind of want to think of a way to identify if it is a real name as well. Maybe just ask for first and last name. Thanks,
  15. I don't, I just find ways around it. I can't create them with a script. I have to go into phpMyAdmin to do it. If I wanted to automate it then I would have to use a script, but that is not allowed.
  16. Blue Host is not free. It is a good deal, but not free. I just want to know if anyone knows a good host with create a table off the top of their head. The free hosting was a seperate idea. I want a free host for my personal site and my sandbox. Anyone know good ones?? Thanks,
  17. Hello All, I am looking to purchase a tablet soon. Either the Google Nexus 7 32GB or the Microsoft Surface. I am really excited for Windows 8, but I don't know if I want to buy the RT verison. I mean if I am going to get the Surface I might as well save my pennies now and buy the Pro verison in Febuary. As for the Nexus 7, the just announced the new ones, but I am worried about a 7 inch tablet. I am trying to move away from android now too because of Windows 8. Although, it is a great solution if I want to get one now. Only $250! I 100 percent don't want the iPad. I don't want anything to do with Apple. Not a big fan of them or their devices. Please, this is not an Android, Microsoft, Apple debate. If you wanna talk about the operating system go ahead, but "it's a better operating system," is not an argument. Have something to back yourself up with. Thanks,
  18. Hey All, I always use Blue Host for my websites, but they don't let you use the CREATE TABLE MYSQL command. Does anyone know of any hosting services, reliable ones, that allow you to use this command?? And on a side note, best free web hosting?? Thanks in advance,
  19. In my database when my comma delimited CSV is uploaded I get quotation marks around my entries ex. "John." It is suppose to upload without the quotation marks.
  20. I am actually going to piggy back onto this topic. Take a look at this query that I wrote out. $sql = "LOAD DATA LOCAL INFILE '$location' INTO TABLE test FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (firstname, lastname, rank, era)"; In my database I am getting quotation marks around firstname and lastname and no value for rank and era. I am uploading a comma delimited CSV. Thanks,
  21. I worked it out, but thanks! Always good help!
  22. Hello All, So I have a two column layout. The left column is 700px and the right 300px. In order to get them right next to each other I floated one left and the other right. The problem with that is the container that they are both in loses its 100% height. Is there another way to get them next to each other without floating them or do I have to use max and min height?? thanks guys!
  23. The validator probably couldn't access the site directly because it is on a school web server. That would be my guess. They are very secure and I feel like they lack the programming to allow the validator to validate. Again, I built the website in 4hrs and I won't be working on it anymore. It will probably get me an A considering I am one of the only people that free handed the code or didn't use a Dreamweaver template or use massive jpegs with a spry bar and call it a website. There is another website that I started for the class, a personal site, that I am going to continue. Just thought I would continue the conversation, show you what we are working on.
  24. I am in the class right now. If you want to check out my latest work you can. Really simple html and css. We can't use PHP on the servers, they don't allow it. Put it together in about 4hrs total. Information is bogus. mywebspace! Yes.... I go to Quinnipiac
  25. Lol! What language do you use?? Javascript??
×
×
  • 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.