Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8130547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:45:27+00:00 2026-06-06T08:45:27+00:00

How do I insert or replace a value on the database ? Basically I

  • 0

How do I insert or replace a value on the database ?

Basically I need to replace one row on the database without alter the rest of the info, in this case is the form_email row based on the id.

On a previous instance I get the email with:

$query = "SELECT `form_email` FROM `$table_name_email` WHERE `id` = $form_id";
$result = mysql_query($query) or die(mysql_error());

while($row_email = mysql_fetch_array($result_email)){
    $email = $row_email[form_email];
    echo $email;
}

But I’m having problems to understand how to inser or replace that email

This is the table structure, just in case.

CREATE TABLE IF NOT EXISTS `contactforms` (
  `id` int(11) NOT NULL auto_increment,
  `form_slug` varchar(100) NOT NULL,
  `form_title` varchar(200) NOT NULL,
  `form_action` mediumtext NOT NULL,
  `form_method` varchar(4) NOT NULL,
  `form_fields` text NOT NULL,
  `submit_button_text` varchar(200) NOT NULL,
  `custom_code` mediumtext NOT NULL,
  `form_style` int(10) NOT NULL default '0',
  `form_email` text NOT NULL,
  `form_success_message` mediumtext NOT NULL,
  `form_thank_you_page` varchar(200) NOT NULL,
  `form_success_title` varchar(150) NOT NULL default 'Form Success!',
  `form_access` text NOT NULL,
  `form_email_subject` varchar(250) NOT NULL,
  `form_email_name` varchar(100) NOT NULL,
  `form_pages` varchar(400) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:45:28+00:00Added an answer on June 6, 2026 at 8:45 am

    You can use the sql UPDATE statement.
    It allows you to update certain fields for certain records, for example (pseudo code):

    UPDATE contactforms
    SET form_email = 'something@narly.com'
    WHERE id = 'someId'
    

    This will modify all form_email fields to something@narly.com for rows with id someId 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this procedure in the database: CREATE OR REPLACE FUNCTION replacePageRelevance(id INT, value
I am using simpleJDBCTemplate to insert a value to a postgre database. String sql
I want to replace and insert escape character sequences with their escape character values,
Possible Duplicate: Insert string between two points with PHP How can I replace everything
found this regex: insert every 10 characters: $text = preg_replace(|(.{10})|u, \${1}. , $text); can
I would like to use batch file to insert a string to replace the
INSERT INTO [Temp].[dbo].[Student] ([Fname], [Lname], [Gender]) VALUES (N'Aname', N'Alname', N'Male') GO This codes workes
INSERT INTO options (owner, name, value, modified) SELECT owner, name, value, modified, @draft:=draft FROM
INSERT INTO orders_total SET `title`='Discount Coupon:', `text` = '-$40.00', `value` = '40.00' WHERE `orders_id`
i am storing files in database and this is the code i am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.