Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
//first you need to connect $host="localhost"; $user_name="username"; $password="password"; $db="your_db"; $connection = mysql_connect($host, $user_name, $password) or die ("Unable to connect!"); mysql_select_db($db) or die ("Unable to select database!"); $results = mysql_query("SELECT pm1 FROM table_name WHERE something = something;"); while ($data = mysql_fetch_array($results)) { echo $data['pm1']; } Does this help?
-
Seems to me that there's is something wrong, or someone told him there is something wrong if he wants to review your scripts, especially with his friend programmer...
-
I think you did a really great job in almost every aspect of the site. I think the large images are typical in a school site. If you look at other school sites they are similar. Good job!
-
Could you post the code for this? Do you mean the title?
-
Usually clients don't really care as long as it works and looks good. If he's just interested on learning some PHP go ahead, and if his programmer buddy wants to take a look at your script, go ahead. If you wrote it properly than you have nothing to worry about, I hope you used W3 standards!
-
The extension is just what kind of file it is. You have have multiple languages in 1 file. For example, I use PHP, MySQL, HTML, and Javascript. Most languages can be intertwined together.
-
I have solved this problem. Not with cookies but by altering my servlet.
-
Did you want something user friendly or can you use something like PhpMyAdmin?
-
The more the semester goes on I'm enjoying LISP more and more. I've always been the iterative guy, never wanted to learn recursion because I didn't have to and didn't really want to. Recursion kind of grew on me. It is also safer and involves less thinking if you know what you're doing. Thanks for your replies.
-
I'm trying to retrieve a value of a specific cookie. It works for all the other existing cookies except this one. The only difference between them is the path name. The ones that work have a path of "/freetrial/" and the one that doesn't work has a path of "/servlet/". Here is my code: String siteID = "Nothing"; Cookie[] cookies = request.getCookies(); for(int i = 0; i { Cookie c = cookies[i]; if (c.getName().equals("siteid")) { siteID=c.getValue(); } } I don't get any errors and the output is always "Nothing". How can I fix this? And I did post of sun.com but no one has responded...
-
Yeah I had COD4 for my xbox360 it was amazing, until my friend stole it >
-
If you decide to use MySQL you should use PHP, makes life easier. Plus it's open source and all free! Glad I could help tml, remember if your topic is solved please click the solved button. Good luck!
-
First, please use the code tags, make life easier for everyone. Second, you're using the <?php and ?> tags in the wrong place... All the code you posted is PHP, try this: if ($_GET['id'] == 1) { echo "hej side 1"; //Display info for ID 1 } if ($_GET['id'] == 2) { echo "hej side 2"; //Display info for ID 2 } ?>
-
All this information can easily be extracted. Try using arrays.
-
Use arrays. One holds the name, the second holds the value of that question's answer (yes/no). Here's a simple example that you could use but need to implement an array: home and learn What's all the information that you need to store? User/Question/Answer?
-
Can't you use the value?
-
You can grab the HTTP variables by using $_GET[''];. You also need to have id=# like in you ASP example, not id2. For example: // For page index.php?id=1 if ($_GET['id'] == 1) { //Display info for ID 1 } if ($_GET['id'] == 1) { //Display info for ID 2 } You can also break it up into case statements like the one in your ASP code... Does this help? Let me know!
-
Sorry I would like to help you but I don't understand exactly what you want or are trying to accomplish. Could you give an example or be more specific?
-
Are there any errors? What is the output? Please look at this: PHP: Mail. I think you need to have headers. Do you have mail set up on your server?
-
Last PC game I've really played was Counter Strike:Source. It has been out for like 5 years but it's still fun. Problem is that no one really plays it anymore. I was contemplating buying Team Fortress but I have never played it before. Starcraft 2 is coming out! I can't wait...
-
When I'm sick of programming I like to play PC games. Besides WoW, what are some fun games you guys would recommend?
-
lol wiki googling? That's funny.
-
Find out where SMF creates and account from the regular registration, CnP, and modify it a bit for your needs.