Jump to content

saurav99990

New Members
  • Posts

    7
  • Joined

  • Last visited

saurav99990's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. We use (INSERT INTO) to insert a record in the table which creates more than one record when used again. Is there any way to add a record and alternately replacing the prevoius one without adding any new record. I know this would work: UPDATE Customers SET ContactName='Alfred Schmidt', City='Hamburg' WHERE CustomerName='Alfreds Futterkiste'; But what if there is no condition ie. we don't know the record, we only know the column name. Is there any way to fill only one record and alternately replace the previous record without creating 2nd record?
  2. We use (INSERT INTO) to insert a record in the table which creates more than one record when used again. Is there any way to add a record and alternately replacing the prevoius one without adding any new record. I know this would work: UPDATE Customers SET ContactName='Alfred Schmidt', City='Hamburg' WHERE CustomerName='Alfreds Futterkiste'; But what if there is no condition ie. we don't know the record, we only know the column name. Is there any way to fill only one record and alternately replace the previous record without creating 2nd record?
  3. I want to replace the content of a column in database. I know I should use this : CREATE OR REPLACE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition but I want to do it without any condition. I want only 1 value in my column that's why I am using replace. Does anyone know to do this? If you are not able to understand my question come on teamviewer....I'll explain you.
  4. I have a div content in a html file which contains some text. I want to change content of that div from different page by entering new text and submitting. How can I do it? Can anyone give me a link to the tutorial page...or provide me the code?
  5. I am using this code to send an email from a contact form. <?php if (isset($_POST['contact_name']) && isset ($_POST['contact_email']) && isset($_POST['contact_text'])) { $contact_name = $_POST['contact_name']; $contact_email = $_POST['contact_email']; $contact_text = $_POST['contact_text']; if (!empty($contact_name) && !empty($contact_email) && !empty($contact_text)) { $to = 'saurav.chill05@gmail.com'; $subject = 'Contact form Submitted.'; $body = $contact_name."\n".$contact_text; $headers = 'From: '.$contact_email; if (@mail($to, $subject, $body, $headers)) { echo 'Thanks for contacting us.'; } else { echo 'Sorry.'; } } else { echo 'All feild are required.'; } } ?> <form action="index.php" method="POST"> Name:<br><input type="text" name="contact_name"><br><br> Email Address:<br><input type="text" name="contact_email"><br><br> Message:<br> <textarea name="contact_text" rows="6" cols="30"></textarea><br><br> <input type="submit" value="Send"> </form> This is not working on localhost. I tried to host this file on a hosting site and then filled the form it says thank you for contacting us, but i don't get any email. please help me with this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.