Jump to content

Kamicase

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Kamicase

  1. @So Called: I did echo $write. That was in my response to Ings post but it didn't show anything weird. But thank you for reminding me to try the query window. There it has shown me, that I miswrote 'comment' where it should have been 'comments'. It's working great now. Thanks to all of you. : )
  2. @Mudsaf: Not sure anymore... I used to get some errors without it but I took it out to check which ones and it works just fine now. So I'll leave it without. The form looks like this: <form method="post" action="GreekSubmission.php"> @So Called: Ah... Did I forget to actually say what went wrong? ^^ Well the mysql_query($write) OR DIE ('Error updating database') ends with the process dying and the error message being displayed. So the final step, the updating of the database, fails. @Ingolme: Very good idea. I did that and it gave me: "INSERT INTO table (name, lastname, color, comment) VALUES ('Dummyvalue', 'Testtext', 'Purple', 'I hope this works') so nothing out of place it seems. Is there something wrong with my syntax?
  3. Hello everyone, after getting some code on and my WAMP server revved up I am now trying to write the input from a form into a MySQL Database.The script I am using runs like this: <?php $alpha=""; $beta=""; $gamma=""; $theta=""; if (isset($_POST['alpha'])) $alpha = $_POST['alpha']; if (isset($_POST['beta'])) $beta = $_POST['beta']; if (isset($_POST['gamma'])) $gamma = $_POST['gamma']; if (isset($_POST['theta'])) $theta = $_POST['theta']; mysql_connect("localhost","root"); // I'm running the Database local and for learning purposes. mysql_select_db("database"); $write = "INSERT INTO table (name, lastname, color, comment) VALUES ('$alpha', '$beta', '$gamma', '$theta')"; mysql_query($write) or die ('Error writing in database.'); ?> When I run the script though (having entered some dummy information in all 4 fields)I had x OR DIE checks for both mysql_connect and mysql_select_db and they both confirmed that everything went fine so the bug must crawl through mysql_query($write) but I just can't seem to pin it down.Does anyone know where I might be wrong?
  4. Son of a gun!Well that took care of it.Silly Notepad. Lesson learned then: When writing .asp Code using the Notepad you have to drop down the Menu to "All files" when saving it, else it will be saved as a textfile, regardless of the ending. Thank you so much!
  5. I can load regular .htm scripts onto my firefox. What I have noted though is that for some reason my computer doesn't convert the extensions.I have created a .txt File, written some HTML script in it and saved it as test.htm but it still remained a text document and wasn't accepted as a Firefox HTML Document. Then I downloaded a test file from w3s which worked just great but as I went to save it on my desktop I noted that my textfile was saved under test.htm.txt.Could this maybe be part of the problem?
  6. I try accessing the script via http://localhost/MyWeb/test1.asp and get the 404.0. So were you thinking about a different HTTP?Furthermore I can't understand what you mean by Could you please expand on that? Regards,Kamicase
  7. Hello everyone, I am new to .asp but interested in the possibilities and have one or two smaller projects I would like to develop some skills on.So far I have followed the W3Schools .asp tutorial, installed IIS (enabling the .asp extension), the MyWeb folder and copy/pasted some .asp Code into a .txt document, saved it as test1.asp and then tried to access it via http://localhost/MyWeb/test1.asp .The script itself reads: <%@ LANGUAGE="VBSCRIPT" %> <!--- You should get ---><!--- current system date and time ---> <HTML><HEAD><TITLE>ASP Test Page</TITLE></HEAD> <BODY>Today's date and time is <%=Now()%>.</BODY></HTML> But everytime I try to load the page it gives me: HTTP-Fehler 404.0 - Not Found I have quadruplechecked the adress C:\inetpub\wwwroot\MyWeb\test1.asp with the one it wants to access C:\inetpub\wwwroot\MyWeb\test1.asp, I have checked if the .asp extension is active under Assigned Handlers (or the closest match, I'm translating from the German Handlerzuordungen here) and now I have to admit that I need help. Does anyone know what I might be doing wrong?
×
×
  • Create New...