Jump to content

phppup

Members
  • Posts

    892
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by phppup

  1. phppup

    the ASTERISK

    Thank you Psycho... for the informative and educational response!
  2. phppup

    the ASTERISK

    Perhaps I wasn't specific enough.... let me re-phrase: If I need data form ONLY one COLUMN in my table, does it make a difference which way I write the quiery? I know the result will be the same, but are there other reasons to use one method over the other??
  3. phppup

    the ASTERISK

    Is there a REAL difference between using: select * from mytable .. blah blah blah versus select COLUMN_NAME from mytable .. blah blah blah I know the result wil be the same, but is there a REAl reason to concern myself or use one method rather than the other?
  4. OKAY! I got it. Thanks again. The <BR> was there because the info was originally printed out within a sentence. (ie: Order number '$id' for '$customer name' contains '$quantity' of this item.) I needed the HTML breaks to avoid a running sentence. When I switched the data into a table, the BR's go overlooked. Thanks for all the assistance.
  5. Sounds like that should do it, huh? Thanks for the solution. It seems sensible. I guess the PHP digests the <BR>s first, and then after they've been regergitated, it spits out the table that I wanted. Thanks again!
  6. I want to print out the findings of my query in a table format. Yet when I include the <table> tag the information drops to a position half way down the browser page. Is there a PHP reason for this? <?php **connection info*** echo "TITLE HERE"; echo "<br>"; $queryC = "SELECT * FROM MYTABLE WHERE pants>0 ORDER BY pants,id ASC"; $resultC = mysql_query($queryC) or die(mysql_error()); echo "<table border='1'>"; //the TABLE TAG is FORCING the display to the BOTTOM of the PAGE echo "<tr> <th>Order</th> <th>Customer</th> <th>Amount</th> </tr>"; // Print out result while($row = mysql_fetch_array($resultC)){ // use the DOT to CONNECT html in QUOTES and PHP-terms echo "<br />"; echo "<tr><td>"; echo "#" . $row['id'] ; echo "</td><td>"; echo $row['customer']; echo "</td><td>"; echo $row['pants'] ; echo "</td></tr>"; echo "<br />"; } echo "</table>"; mysql_close(); ?>
  7. Can anybody clarify the usefulness of "AS" and elaborate on how it operates. If I select a 'bananas' AS 'yeelow fruit' will it change the TITLE in the table? Or the table that is being viewed? If I dump a list of 'FRUITS' into and HTML table, will using AS rename each column for me, or is that handled by MY coing of the HTML table?
  8. I had a similar problem months ago. I don't recall how I solved it other than ignoring GoDaddy completely. ANd there HELP is of NO HELP at all.
  9. And what about the SQL statement? How should that be modified?
  10. I'm trying to understand the mechanics of PHP. Suppose I have a form that collects these three values $firstname = $_POST['firstname']; $middleinitial= $_POST['middleinitial']; $lastname= $_POST['lastname']; and I want to insert EVERYTHING into ONE FIELD in my table called FULL_NAME. What is the methodI should use to COMBINE the values shown above? Do they need to be listed individually in the statement below? What if I want a final entry to contain fiirstname (space) middleinitial (period) (space) lastname all in one field? $sql = "INSERT INTO myTable ( FULL_NAME ) VALUES ( $firstname,$middleinitial,$lastname )"; $result=mysql_query($sql); Would the $SQL line look like this? Or am I totally off track?
  11. I currently have a Javascript placed at the top of the same file as my HTML form. Now I need to run the file as PHP, and was wondering what the proper protocol and best practice is for the JavaScript (which does some client side validation). Can I leave it as is, at the top of the file after changing the extention to PHP. If I put it in a seperate file, should I call it as a JavaScript or as an INCLUDE file. If I INCLUDE it, should the INCLUDE be a PHP file (that contains the JS, or a JS extention. Does any of this make a difference, or will any method work, leaving it to personal preference?
  12. OKAY... so i was 'playing' the other evening, and i DID add a 'CLASS' to one button. After doing this, it accepted the size changes PERFECTLY. I have to assume the group would react similarly. So why will they respond in the CLASS (and in the tagline) but NOT when cirected by TYPE? Why does THAT work on the webpage (see above for the link) but NOT in my own browsers (which I attempted on two versions of IE running two different operating systems?? Any answers? (could it be because I'm on the east coast?? LOL)
  13. Hey Drummin. Nope, it won't work. I've concluded that the server will NOT run PHP in an HTML file. (i believe this is one of the reasons I got roped into learning full blown PHP in the first place... LOL) It appears INCLUDES are also suspect. Although I've seen some articles that blame IntExplorer too. I suppose I'll survive with just PHP files (but I'd have liked to see them as HTML at home, where my PC isn't running PHP.)
  14. YES. I'm going to use DECIMAL with 4,1. But in testing, I used INT and input the decimalled values and it worked. The only "issue" I had was that they had no zeros for the whole numbers. This was unlike the values that I had in the VARCHAR fields which DID add the zeros, but require too much disk space. I suppose that this trail of making ALL the right moves for ALL the wrong reasons has ultimately lead me to the CORRECT answer (for whatever reasons). Thanks for all the help.
  15. OK, so I tried to get the html to INCLUDE on my server, and it didn't work either. Now what?
  16. I AM. At least now I know where the coding example came from.... LOL BUT, how come (even after i cut and pasted it) the button SIZE in MY BROWSER is REFUSING to change. There's a glitch somewhere! Any clues??
  17. Sorry to disappoint you, but this time, that IS the ENTIRE page with the ENTIRE code content. All on page (for now). With three lines of CSS. Shouldn't it work the same as on a page with miles of code?? Of course it should. But it doesn't! WHY?
  18. Not sure. SO you're saying this ONLY works on the server that I maintain the website on? And the machine in my bedroom probably won't recognize it?
  19. There are 4,532 buttons. It will take me longer to ADD the CLASS or edit them INLINE than to simple control them by TYPE..... don't ya think??? I thought CSS could do this.... am I wrong?
  20. It does NOT work!! I just cut and pasted it AGAIN. Change the size in CSS, and nothing happens!
  21. I am recording orders for the sale of items. People can order cases by the WHOLE or HALF quntity. Thus, 1.0, 1.5,2.0, 2.5 etc. I didn't initially realize that DECIMAL and FLOAT were COLUMN TYPES in their own right, I mistakenly thought they were OPTIONS for the INT values. So, at this point, I suppose I can use EITHER the DECIMAL (or FLOAT for this instance, although still shakey as I've heard accuracy is an issue) or TINYINT with number_formatting to get the result I want and still be following the proper protocols.
  22. How do I edit the code that "rythemton" mentioned if I'm not writing an array. All the data is coming from a form. I seem to get into trouble whenever there are ARRAYS that are ITEMIZED in the code rather than having values coming from a form or a table.
  23. I have the code so that onClick of a submit button, a new window opens with information. Now I want to move to a new window in the SAME browser, what is the code for that, so that it functions as if an <a href> tag were clicked?
  24. I am having trouble using INCLUDE in my HTML. I know I've used it before, so I don't understand where my problem is coming from. I created a simple HTML file named ok.htm, it has ONE line that says HI. For testing, I actually added a second line for it to INCLUDE ITSELF: <!--#include virtual="ok.htm" --> It didn't work in itself, or any other HTML pages. What am I doing wrong on my local machine?
  25. I have a table with a 3 buttons and want to control the button size uniformly thru CSS. My code below isn't working. Where have I gone wrong? <html> <head> <style type="text/css"> input[type=button] { width: 20em; } </style> </head> <table> <input type='button'>
×
×
  • 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.