Current Page: 1 of 1
Results 1 - 16 of 16
17 years ago
Jan
Hi, Thank you for your time however I am getting the following error: Parse error: syntax error, unexpected '{' in C:\wamp\www\insert_contact2b.php on line 25 Why is it saying .PHP on line 25 though I specifically put my .HTM file on that line ? Please help Thanks
Forum: WampServer English
17 years ago
Jan
Hi, I have a separate HTML file that has FORM and when Submit button is clicked on, it calls in the PHP (which is also a separated file) to Insert the data into database. My problem is once data are inserted, I have to click on Back on the browser to go back to the HTML file, where the Form is, and if I accidentally click on Refresh button while still on the (//localhost/blabla.php) page, it wil
Forum: WampServer English
17 years ago
Jan
Hi, Is there a way or a code in PHP or in HTML that I can insert that would validate the form first before sending or inserting data to database, like if one field is left blank, a message will appear. Please help Thank you.
Forum: WampServer English
17 years ago
Jan
I have created an html file where I can enter names, addresses, etc. When I click on button Send, it calls in the other file which is PHP and it then automatically inserts them into MYSQL database. While my screen is still at the php mode or where it still says //localhost/insert.php on the address bar, when I click on Refresh button on the browser, i get the following message: "The page c
Forum: WampServer English
17 years ago
Jan
I have followed everything you said as below. I did change the mysql_fetch_row into mysql_fetch_array before because i know i was dealing with string. <?php $host = 'localhost'; $user = 'root'; $pass = ''; $database = 'sendrec'; $dbconnect = mysql_connect ($host, $user, $pass) or die ('Unable to connect to the database.'); $dblink = mysql_select_db ($databse, $dbconnect); $query ="SEL
Forum: WampServer English
17 years ago
Jan
i tried echo count($row); and got "1", so that means query is okay. Do I have to make fname column as a primary key? Please help.
Forum: WampServer English
17 years ago
Jan
when I changed the php script to: $query ="SELECT * FROM sender where fname='".$_POST['fname']."'"; $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $id=$row[0]; $fname=$row['fname']; $lname =$row[2]; $date_entry =$row[3]; $str_apt =$row[4]; $str_name =$row[5]; $city =$row[6]; echo "id : S$id <br>";
Forum: WampServer English
17 years ago
Jan
If the scripts above has variable ID, it works, but if I change all the ID variables (not including variable inside the 'While') to fname so I can search by the Firstname, I got an error.
Forum: WampServer English
17 years ago
Jan
--------------------- <form action="select_name.php" method="POST"> <input type="text" name="fname"> -------------------- $query ="SELECT * FROM where fname=$_POST"; $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $id=$row[0]; $fname=$row[1]; $lname =$row[2]; $date_entry =$row[3]; $str_
Forum: WampServer English
17 years ago
Jan
Correction it should be: // "PC-1 IP ADDRESS"/script.htm not: //localhost/ "PC-1 IP ADDRESS"/script.htm "http:" can be omitted. "//" works fine alone Sorry
Forum: WampServer English
17 years ago
Jan
If your LAN is working properly, it should be automatically shared. Let's say you have 2 pc connected over LAN, you installed WAMP on the PC-1, then you created a script (html or PHP). Then find out PC-1 IP address. On your PC-2, type the following on the browser address : //localhost/ "PC-1 IP ADDRESS"/script.htm It should work Good Luck!
Forum: WampServer English
17 years ago
Jan
THANK YOU, THANK YOU, THANK YOU, THANK YOU. IT WORKED !!!! Thank you for spending your time in reading and resolving my problem. THANK YOU. I am a PHP beginner, what can I say. THANK YOU VERY MUCH.
Forum: WampServer English
17 years ago
Jan
----------------------- insert.htm ------------------------- <html> <head> <title>test</title> </head> <body> <form action="insert.php" method="get"> <input type="text" name="fname"> <input type="submit" value="submit"> </form> </body> </html> -------- config-sendr
Forum: WampServer English
17 years ago
Jan
thank you for another good advice. Now I found an answer and they worked okay. Can you help me or show me on how to input/insert data into the table using the same scenario as mentioned above for retrieving. Thank you.
Forum: WampServer English
17 years ago
Jan
Thank you very much for your time to give me a good solution. However I was getting an error message : T_ENCAPSED_AND_WHITESPACE..... but when I did the following: $query = "SELECT id, fname,lname FROM database WHERE id = $_POST"; it worked okay. I just removed the single quotations in the bracket. Thank you for your help. I really appreciated it. Have a good day
Forum: WampServer English
17 years ago
Jan
query = "SELECT id, fname,lname FROM database"; the above statement retrieves everything from the database. I tried the below statement to retrieve only the person I wish by using WHERE and it works okay : $query = "SELECT id, fname,lname FROM database where id=0001"; Now, how do I make the "WHERE ID" accepts user input (or variable) instead of typing in manu
Forum: WampServer English
Current Page: 1 of 1