Hi,

I want to use a php form textfield to change a value in my databas.

Statement i want to send the databas: UPDATE people SET name='VALUE FROM TEXTFILED' WHERE id=1

How do i integrate this statement into a php form textfield?

Assuming you are using a mysql database, this should do the trick:

if(isset['submit']) {
mysql_query("UPDATE people SET name='".$_POST['value from field']."' WHERE id=1");
  }

Happy coding:)

Most of the time (like 99% of the time), people tend to forget how important it is to sanitize the user's input. Using mysql_real_escape_string will prevent sql injections by escaping ' and /.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.