hello thanks to view my post now i tell what i need i want to create a request zone where any user request me with detail but any one cannot see the detail for ex : name : ph no : request: done!! when click on done a file which already exits req.txt or any else add a new line with full detail can any create this code for me i realy say thanks to him/her
Need help to create detail in a page
Started on the old forum in March 2012 · view the original in the archive · old links redirect here
arnage wrote: This is not request for help.
🤣 why i'm not surprised ? =) ..... Hey buddy 🔪 no one will do free work for you .. instead posting here you better start learning basic stuff here PHP: Hypertext Preprocessor or you may still try your luck 🔫 who knows =]]...
This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!
heres some help to get you started:
<?php
echo '<form action="index.php" method="post">';
?>
😀
something else wrote: heres some help to get you started:
<?php echo '<form action="index.php" method="post">'; ?>:D
🤣 you'r a criminal , ram pam pam pam !
This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!
<?
if(isset($_POST["PST"])){
if (!empty($_POST["name"]) && !empty($_POST["phn"]) && !empty($_POST["about"])){
mysql_query("INSERT INTO misc SET name='".$_POST["name"]."', phone='".$_POST["phn"]."',about='".$_POST["about"]."'");
}
else
{
echo "Missing Input";
}
?>
<form action='' method='post'>
<b>Name:</b><input type='text' name='name'/><br>
<b>phone:</b><br>
<textarea name='about' rows='50' cols='50'>+91</textarea><br/>
<b>About u:</b><br>
<textarea name='about' rows='50' cols='50'></textarea><br/>
<input type='submit' name='PST' value='Here we go'/>
</form>
SQL
CREATE TABLE IF NOT EXISTS misc (
id int(10) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
phone varchar(300) NOT NULL,
about text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
come on guys 🙄 make it right 🙄
<?php
echo '<form action="index.php" method="post">';
echo '<p>';
echo 'name:<input type="text" name="name" value=""/><br/>';
echo 'ph no :<input type="text" name="phno" value="" /><br/>';
?>
😍 😂
Added after 2 minutes:
<? if(isset($_POST["PST"])){ if (!empty($_POST["name"]) && !empty($_POST["phn"]) && !empty($_POST["about"])){ mysql_query("INSERT INTO misc SET name='".$_POST["name"]."', phone='".$_POST["phn"]."',about='".$_POST["about"]."'"); } else { echo "Missing Input"; } ?> <form action='' method='post'> <b>Name:</b><input type='text' name='name'/><br> <b>phone:</b><br> <textarea name='about' rows='50' cols='50'>+91</textarea><br/> <b>About u:</b><br> <textarea name='about' rows='50' cols='50'></textarea><br/> <input type='submit' name='PST' value='Here we go'/> </form>SQL
CREATE TABLE IF NOT EXISTS misc ( id int(10) NOT NULL AUTO_INCREMENT, name varchar(100) NOT NULL, phone varchar(300) NOT NULL, about text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Ain't funny bro 🙂) you skrewd the party ... bleah 👏
This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!
<?php echo '<form action="index.php" method="post">'; echo '<p>'; echo 'name:<input type="text" name="name" value=""/><br/>'; echo 'ph no :<input type="text" name="phno" value="" /><br/>'; ?>😍 😂
Added after 2 minutes:
Ain't funny bro 🙂) you skrewd the party ... bleah 👏
party Is Over 😛 he he 😀
can any create this code for me i realy say thanks to him/her
So many helpers, Now decide whom to say thanks 🤣
I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID
This is one of ways to write to file and to read and display you will try to do yourself. 😉
if (!empty($_POST['submit']) && $_POST['submit'] == 'done') {
$name = !empty($_POST['name']) ? htmlentities($_POST['name'], ENT_QUOTES, 'UTF-8') : null;
$phno = !empty($_POST['phno']) ? htmlentities($_POST['phno'], ENT_QUOTES, 'UTF-8') : null;
$request = !empty($_POST['request']) ? htmlentities($_POST['request'], ENT_QUOTES, 'UTF-8') : null;
if (isset($name, $phno, $request)) {
$file = 'req.txt';
$data = "|-|$name|-|$phno|-|$request|-|\n";
if (is_writeable($file)) {
$handle = @fopen($file, 'a');
@fwrite($handle, $data);
fclose($handle);
} else { exit; }
} else {
echo 'All fields are requiered.';
}
} else {
echo '<form method="post" action="./index.php" enctype="multipart/form-data">'.PHP_EOL;
echo '<p>'.PHP_EOL;
echo 'Name: <br/>'.PHP_EOL;
echo '<input type="text" name="name" value=""/><br/>'.PHP_EOL;
echo 'Phone: <br/>'.PHP_EOL;
echo '<input type="text" name="phno" value=""/><br/>'.PHP_EOL;
echo 'Request: <br/>'.PHP_EOL;
echo '<input type="text" name="request" value=""/><br/>'.PHP_EOL;
echo '<input type="submit" name="done" value="Done"/>'.PHP_EOL;
echo '</p>'.PHP_EOL;
echo '</form>'.PHP_EOL;
}