Jump to content

erok

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by erok

  1. Hi peoplei have a customerlist in a table inside php page.Table starts about twenty line down form the top of the page. I do not know why there are about twenty line white space from the top before table starts. When i insert new row to the table it push the table one more line down.Which means one more line white space from the top before the table.When i insert another new row, one more white space line from the top before the table and so on.I looked the CSS and HTML i do not see any problem. Is it possible problem comes from the php? I am working with xampp and phpmy admin in windows 7. i use php 5.3 Another thing, my customerlist is case sensitive. How can i make it case insensitive?I do not want same record twice in the table.Any direction appreciatedErok
  2. erok

    form connect to mysql

    Thank you all who inspiring and helping me out,Program is running now. One form control three seperate buttons.All i needed to do is combining three sepererate files update, delete and insert into a file and using it as ( action="unitedkitchen.php" ) in the form code." Just some guy " tutorial is especially helpful.erok
  3. erok

    form connect to mysql

    It was html file instead of php file. That is why it showed error 403. I switched it to php file, when i submited the form this time it took me to localhost xampp index page.It did not parse php
  4. erok

    form connect to mysql

    Sorry about that, It is at this copy. In original file I have semicolons. Still it did not run.Actually i see error 403 when i try to run program
  5. erok

    form connect to mysql

    I tried this. It did not run.Any suggestion appreciated<form method="post" action="<?php if (isset($_POST['formupdate'])) { echo 'yenileyerel.php' } if (isset($_POST['formdelete'])) { echo 'silyerel.php' } if (isset($_POST['forminsert'])) { echo 'ekleyerel2.php' } ?> " >First name:<input type="text" name="firstname" size="30" maxlenght="30" /><br /><br />Last name:<input type="text" name="lastname" size="30" maxlenght="30" /><br /><br />Phone number:<input type="text" name="phone" size="30" maxlenght="30" /><br /><br /><input type="submit" name="formupdate" id="formupdate" value="Update" size="25" /><input type="submit" name="formdelete" id="formdelete "value="Delete" size="25" /><input type="submit" name="forminsert" id="forminsert" value="Insert" size="25" /></form></body>
  6. erok

    form connect to mysql

    Hi everyone,If it is possible to use same form for more than one button such as delete , update and insert to/from phpmy admin.I want to use one form and three button under the same form.Any direction appreciatedErok
  7. erok

    Next step?

    I have a question especially referring " the scientist " statement below " try and do something on your own for once!!! The examples are right ##### there!http://www.w3schools...ysql_select.asp "And here it is ;<?php$con = mysql_connect("localhost","peter","abc123");if (!$con){die('Could not connect: ' . mysql_error());}mysql_select_db("my_db", $con);$result = mysql_query("SELECT * FROM Persons");echo "<table border='1'><tr>< th>Firstname</th>< th>Lastname</th>< /tr>";while($row = mysql_fetch_array($result)){echo "<tr>";echo "<td>" . $row['FirstName'] . "</td>";echo "<td>" . $row['LastName'] . "</td>";echo "</tr>";}echo "</table>";mysql_close($con);?> The output of the code above will be: Firstname Lastname Glenn Quagmire Peter Griffin Here is the question ; Can we print this output to a specific html or php page (whichever is more suitable you think), other than printing the output to an empty screen?Something like " db.html " or " db.php " page, maybe using " href= " link or whatever code you think.So end user can see welcome statement and some other decoration on the page besides output table list.help would be appreciated
  8. erok

    Next step?

    Thank you so much, Don E from Michigan. For your definitive, logical explanation of 'indexes' or 'keys' or 'elements' and 'associative array' meanings. I felt like i learned something which was not clear in my mind before.I have a question,You wrote the code look like this in comment.php file, 1#)- $sql = "INSERT INTO comments (FirstName, LastName, Comments) VALUES ('$firstName','$lastName','$comments')"; In php lessons, as far as i know in order to get PHP to execute any statement we must use the mysql_query() function.This function is used to send a query or command to a mysql connection. And i would write the statement something like this. 2#) - db_query("INSERT INTO comments(FirstName, LastName, Comments)VALUES('$firstName' , '$lastName' , '$comments')"); Now i am confused on which way to wright the statement.I would appreciate if you tell me why it is so something like in 1#)
×
×
  • Create New...