Search found 18 matches

by DonPatricio91
Fri Dec 14, 2007 10:54 pm
Forum: Databases
Topic: Database Query Help
Replies: 4
Views: 752

didn't try it yet, but that'll work i think. thanks for helping
by DonPatricio91
Fri Dec 14, 2007 10:46 pm
Forum: Databases
Topic: Database Query Help
Replies: 4
Views: 752

the structure is exactly as I mentioned in my first post.

2 columns one named: first, other: second
by DonPatricio91
Fri Dec 14, 2007 9:48 pm
Forum: Databases
Topic: Database Query Help
Replies: 4
Views: 752

Database Query Help

HI, I got a Database with a Table. The table consists of 2 columns. One named first, the other named second. In these Databases values get inserted. Specifically, values of users get inserted, cause my whole project consists of a type of community. Now, I got a Cookie: $username; which tells me whic...
by DonPatricio91
Wed Dec 12, 2007 11:50 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

OK, well so you actually understand what what I am trying to do. I am currently working on a project like Facebook, MySpace etc. Firstly, I just want to program the basics, I already have a login/register/userlist/profil for each user and now due to your help users can also edit their profil. howeve...
by DonPatricio91
Wed Dec 12, 2007 11:31 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

i am really learning a lot here today. i had to apply only one change. <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); $username = $_COOKIE['ID_my_site']; if (isset($_POST['submit'])) { $sql_u...
by DonPatricio91
Wed Dec 12, 2007 11:19 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

yeah, it was really good that you didn't give me the answer, cause that made me think and i think this is right, at least it works: <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); $username = ...
by DonPatricio91
Wed Dec 12, 2007 10:52 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

<?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); $username = $_COOKIE['ID_my_site']; if (isset($_POST[submit])) { $sql_username_output = mysql_real_escape_string($_POST['username_output']); $s...
by DonPatricio91
Wed Dec 12, 2007 10:40 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

ok, my current code is: <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); $username = $_COOKIE['ID_my_site']; if (isset($_POST[submit])) { $sql_username_output = mysql_real_escape_string($_POST[...
by DonPatricio91
Wed Dec 12, 2007 10:22 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

Oh wow, I'm sorry i really don't understand what i am supposed to do, i actually just learned php, i know all the basics and suddenly somebody tells me that my script is unsafe. that is kind of scary. It would be great if you could give me an example regarding my code, because i really have no clue....
by DonPatricio91
Wed Dec 12, 2007 9:59 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

sry it works : <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); $username = $_COOKIE['ID_my_site']; if (isset($_POST[submit])) { $sql_username_output = mysql_real_escape_string($_POST['username...
by DonPatricio91
Wed Dec 12, 2007 9:57 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

ok, my updated code is as following: <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); $username = $_COOKIE['ID_my_site']; if (isset($_POST[submit])) { $sql_username_output = mysql_real_escape_s...
by DonPatricio91
Wed Dec 12, 2007 9:50 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

ok, i am working on that, give me a second, thanks
by DonPatricio91
Wed Dec 12, 2007 9:33 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

thanks, it works like that <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); $username = $_COOKIE['ID_my_site']; if (isset($_POST[submit])) { mysql_query("UPDATE users SET username='$_POST[...
by DonPatricio91
Wed Dec 12, 2007 9:26 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

this <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); if (isset($_POST[submit])) { mysql_query("UPDATE users SET username='$_POST[username_output]' WHERE username='$username';") or di...
by DonPatricio91
Wed Dec 12, 2007 9:21 pm
Forum: PHP - Code
Topic: php automatic refresh after form submit
Replies: 23
Views: 2398

IF I do that the script doesn't even work. No values are being updates in the db. however if I i move it above echo "<form method='POST' action ='profile_edit.php'>"; the script works, but same result, i would have to refresh my page in order to be able to see the updated results. Should t...