Jump to content

Questions?


eduard
 Share

Recommended Posts

What kind of questions can I write on my html form related to this php file: <html><head><title>MySQL Table Viewer</title></head><body><?php$db_host = 'localhost';$db_user = 'root';$db_pwd = 'usbw';$database = 'website';$table = 'links';if (!mysql_connect($db_host, $db_user, $db_pwd)) { die("Can't connect to database"); }if (!mysql_select_db('website')) { die("Can't select database"); }// sending query$result = mysql_query("SELECT * FROM ($table)");if (!$result) { die("Query to show fields from table failed");}$fields_num = mysql_num_fields($result);echo "<h1>Table: {$table}</h1>";echo "<table border='1'><tr>"; // printing table headers for($i=0; $i<$fields_num; $i++) { $field = mysql_fetch_field($result); echo "<td>{$field->name}</td>"; } echo "</tr>\n"; // printing table rows while($row = mysql_fetch_row($result)) { echo "<tr>"; // $row is array... foreach( .. ) puts every element // of $row to $cell variable foreach($row as $cell) echo "<td>$cell</td>"; echo "</tr>\n"; } mysql_free_result($result); ?></body></html> Should this be method "post" and I assume I can write both queries (see previous question) on 1 html form?

Link to comment
Share on other sites

I have really no idea what you are asking for. You can make the method POST or GET depending on your needs, there are slight differences between the two, which you can find if you read the tutorials. About needing two queries, you will have to elaborate, as you have provided no context on what these queries would be doing, or what you are trying to do with this form. Do you mean one query to INSERT/UDPATE data, and one to SELECT, to show data? As for the questions you can write, I'm really sure what you are talking about. You can make a form anything you want. That's what programming is. Having a problem and developing a solution for it, that fits your needs.

Link to comment
Share on other sites

I have really no idea what you are asking for. You can make the method POST or GET depending on your needs, there are slight differences between the two, which you can find if you read the tutorials. About needing two queries, you will have to elaborate, as you have provided no context on what these queries would be doing, or what you are trying to do with this form. Do you mean one query to INSERT/UDPATE data, and one to SELECT, to show data? As for the questions you can write, I'm really sure what you are talking about. You can make a form anything you want. That's what programming is. Having a problem and developing a solution for it, that fits your needs.
Yes, those 2 queries e. g.! But I understand that you can´t elaborate (?) them all!To get data of my db I´ve to write a select.php script?
Link to comment
Share on other sites

yes. didn't you already have a demo of this kind of functionality on your site last time you posted on here a few months ago? You need two queries, but you could only use one page if you wanted to.

Link to comment
Share on other sites

yes. didn't you already have a demo of this kind of functionality on your site last time you posted on here a few months ago?
"You're travelling through Eduard dimension, a dimension made of havoc and confusion of mind; a journey into a terrifying land whose boundaries are unbelievably small. That's the signpost up ahead---your next stop the Eduard Groundhog Zone." I so wish i could add the Twilight Zone theme tune, to this :D Edited by dsonesuk
  • Like 3
Link to comment
Share on other sites

yes. didn't you already have a demo of this kind of functionality on your site last time you posted on here a few months ago? You need two queries, but you could only use one page if you wanted to.
Thanks! I must have that select.php somewhere! But where? Other country, other computer, other website, other ....?
Link to comment
Share on other sites

Thanks! I must have that select.php somewhere! But where? Other country, other computer, other website, other ....?
... flash drive, email, web hosting account...There are tons of free services in which you can store a lot of data, sometimes up to Gigabytes. OK, so you lost those old files... but seriously think about getting yourself such an account so that you don't lose those new ones too, especially if losing them means "re"-learning the whole thing.
Link to comment
Share on other sites

:good: your email address keeps stuff like that good :rofl: i use to do that before i ended up with a external hard drive hehehehehehehe
Link to comment
Share on other sites

... flash drive, email, web hosting account... There are tons of free services in which you can store a lot of data, sometimes up to Gigabytes. OK, so you lost those old files... but seriously think about getting yourself such an account so that you don't lose those new ones too, especially if losing them means "re"-learning the whole thing.
It was not a question to you, but to me! But I´ve found it! (flash drive)
Link to comment
Share on other sites

yes. didn't you already have a demo of this kind of functionality on your site last time you posted on here a few months ago? You need two queries, but you could only use one page if you wanted to.
Sometimes, I love you (found that select.php file!).
Link to comment
Share on other sites

... flash drive, email, web hosting account... There are tons of free services in which you can store a lot of data, sometimes up to Gigabytes. OK, so you lost those old files... but seriously think about getting yourself such an account so that you don't lose those new ones too, especially if losing them means "re"-learning the whole thing.
I used the verb: TO HAVE, not TO SAVE! Edited by eduardlid
Link to comment
Share on other sites

It was not a question to you, but to me! But I´ve found it! (flash drive)
I know, but you clearly surrounded the question with lots of sarcasm, which is why I added onto your rhetorical question, in an attempt to show you the sarcasm isn't warranted.
I used the verb: TO HAVE, not TO SAVE!
???
Link to comment
Share on other sites

I know, but you clearly surrounded the question with lots of sarcasm, which is why I added onto your rhetorical question, in an attempt to show you the sarcasm isn't warranted. ???
??? = to explain my sarcasm!
Link to comment
Share on other sites

??? = to explain my sarcasm!
No...I didn't understood what you meant with
I used the verb: TO HAVE, not TO SAVE!
What difference does that make?
Link to comment
Share on other sites

No... I didn't understood what you meant with What difference does that make?
The difference: Where do I have it? Where can I save it?
Link to comment
Share on other sites

The difference: Where do I have it?Where can I save it?
When taking the sarcasm into account, it seemed like "Where do I have it?" was meant as "Where could I have had it?" => I added those other places to your list of places you could've had your file.
Link to comment
Share on other sites

When taking the sarcasm into account, it seemed like "Where do I have it?" was meant as "Where could I have had it?" => I added those other places to your list of places you could've had your file.
Ok, you win! (or is it: have won?)
Link to comment
Share on other sites

yes. didn't you already have a demo of this kind of functionality on your site last time you posted on here a few months ago? You need two queries, but you could only use one page if you wanted to.
What does that page look like?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...