Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
[quote author=mgallforever link=topic=119797.msg490955#msg490955 date=1166932303] But for all we know, he might not even be using a doctype. [/quote] So...invalid HTML is okay if everything is invalid? :/
-
XHTML specs say you must quote attributes. Gotta keep up with the times. There most certainly is a point. What about when you want to do this: <p class="sub class">. Can you do <p class=sub class>? I think this will not work. I use multiple classes often. Just because it used to be okay to leave them unquoted doesn't mean it will always be that way ;)
-
What you are writing creates this. <td><p class='classname'>hello</p></td> Which is still using single quotes. My point was that AFAIK, HTML attributes should be double quoted. So if you really wanted to surround your string in double quotes, you'd need to escape them using \". What you're doing is just concatenating a bunch of strings. If you're going to bother concatenating strings, use $str = '<p class="className">'.$var.'</p>'; But since the OP is trying to alter the style based on code, the classname should be a variable. $str = '<p class="'.$className.'">'.$var.'</p>'; OR $str = "<p class=\"$className\">$var</p>"; It's a matter of preference, but I'm going to go check on the HTML part. I think they have to be double quotes.
-
mgall, what you did to my $str doesn't make sense. I've never heard of using a single quote to escape a quote. It's a \...are you thinking of sql? Please show me in the docs where it says you can escape like that. It would be $str = "<p className=\"$name\"></p>"; viwig - you know how to create if else statements ;)
-
You need to look at your code more carefully. Look for the stray quotes. hint: it's right before INACTIVE. You should use a single quote to start and end your string since HTML attributes should have double quotes surrounding them: [quote]$str = '<td><p style="className">Text</p></td>';[/quote] You also don't need to concat your two strings, just make one string. And use CSS!!!
-
That's probably why that line has an error, you're not setting a table. What is that variable supposed to be? You should really set your styles using classes in CSS too.
-
Okay...
-
If you think the $_POST['war'] is empty, then check your form! when you process, do print_r($_POST) and you will see all posted vars.
-
[SOLVED] can you not have variable in the filename?
Jessica replied to ted_chou12's topic in PHP Coding Help
This is why you should actually post YOUR code, instead of retyping it. -
[SOLVED] can you not have variable in the filename?
Jessica replied to ted_chou12's topic in PHP Coding Help
Look at what you wrote. The first one says .txt, the second says txt. Since you error does not reflect this typo, that means you didn't actually copy and paste your real code. Your mistake is probably there. Link? -
[SOLVED] can you not have variable in the filename?
Jessica replied to ted_chou12's topic in PHP Coding Help
The 2 doesn't show, or the file opening fails? You're missing a . in the second line. -
Use a persistent connection. mysql_pconnect.
-
Whatever you want. Print 'test' at the start and end to see where it is failing. You need to include your connection in each file if you want to query the database. Use require instead of include - you hardly ever include something which is optional. Also, the code in your first file produces invalid HTML.
-
Try printing something at the very start of the file, and at the very end to make sure the whole thing can load. Turn on error reporting while developing. Also, where is your database connection on the second file?
-
Okay, booooo for using frames. Your while loop isn't closed. The page won't load because of that.
-
session_start(); $_SESSION[] You keep mixing up your capitalization. Plus you have an unquoted string. It should say 'tomas' or "tomas" not just tomas.
-
[code]echo "<a href='page3.php?vid=" . $vid . "&cid=". $cid . "'>" . $categoryname . "</a><br>";[/code] You need to specify what the second var is.
-
You could do that, then parse the data, store it in the database however you chose. You could just upload the actual text file, not copy and paste but upload, then parse it when the file is viewed. There are a ton of ways you could do this. If a csv file is easiest, then do that. How you store it in the database is up to you, but it sounds like you have a movies table with fields title, role, company. Easy to add more. *shrug*
-
Why is that the simplest way? CSV files often seem to be more trouble than they're worth. Why not just have a few text boxes for each section and let her type in data. What kind of resume has data that you'd put in a csv? I mean, there are so many different parts, there's education, past work, objective - those aren't things that would work in a csv. I am kind of confused with what you're doing.
-
What does the database have to do with what you just said you wanted to do? You want them to paste the contents of the file into the textbox and store it in the database? Or do you want it to parse the values and sotre them in a bunch of fields in the table? Create an HTML form, then get the value of the textarea, then store it in your database. Look at the tutorials for information on databases if that's where your stuck... Ted: Comma Delimited means the values are separated by commas. ID,Name,Email, 1,Ted,[email protected], 2,jesirose,[email protected], etc.
-
include($path.'functions.php'); You have a dot in your string. That is why the dot is there.
-
[SOLVED] Keeping Form Values After Error Message
Jessica replied to zfred09's topic in PHP Coding Help
There are plenty of resources about Web Security and sanitizing data. I'm sure you can find some if you search for SQL injection, XSS, etc. -
[SOLVED] Keeping Form Values After Error Message
Jessica replied to zfred09's topic in PHP Coding Help
It means making sure the user didn't enter any data you don't want. You don't want them to inject SQL, HMTL or Javascript. -
What is a combo box? If you're asking how to create an HTML form, then you need to do some searching and read some tutorials before asking such a vague question. Then, read up on connecting to an Access database. I don't use Access, but it seems like the tutorial I linked to goes over how to connect to Access using PHP.
-
[SOLVED] Keeping Form Values After Error Message
Jessica replied to zfred09's topic in PHP Coding Help
I would recommend having a separate processing file - although I can't think of a way to explain why :( Also, make sure to sanitize your user's data before printing it back to the screen, or you open yourself up to XSS attacks.