NameSilo

Help needed: How to update Php values?

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

senesh

New Member
Impact
0
Hi

I'm php newbie. For example, I have a php file like this:

php Code:

<?
$value1="content1";
$value2="content2";
?>

Now I want to create a HTML site with 2 input forms allow me change the values (content1, content2) without edit above file manually. I can enter new data and click update button, then it will update new values of above php file.

How do I create this file? There are no SQL DB or complicated functions.

Thank you
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
If you have a form that posts variable to another page, then this is how you would assign the variables. The input boxes in your form would be named value1, and value2, and would post to the page containing the below code. I am not sure if this is what you are looking for or not. Of course, you should always clean an input that a user puts in as well, but this is a basic example.

PHP:
$value1 = $_POST['value1'];
$value2 = $_POST['value2'];
 
0
•••
<form method="post" action="whatever.php">
<input type="text" size="20" maxlength="30" name="text1" />
<input type="text" size="20" maxlength="30" name="text2" />
<input type="submit" value="submit" />
</form>

<?php
$text1 = $_POST['text1'];
$text1 = $_POST['text2'];

echo $text1;
echo $text2;

?>
 
0
•••
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back