Jump to content

eugene2009

Members
  • Posts

    109
  • Joined

  • Last visited

    Never

Everything posted by eugene2009

  1. having a problem.. how can i create a table in a mysql database from a users input? CREATE TABLE $tablename( '. 'cid INT NOT NULL AUTO_INCREMENT, '. 'cname VARCHAR(20) NOT NULL, '. 'cemail VARCHAR(50) NOT NULL, '. 'csubject VARCHAR(30) NOT NULL, '. 'cmessage TEXT NOT NULL, '. 'PRIMARY KEY(cid))'; Say i have a text input on the previous page named "tablename" why doesnt it still work? Please help.
  2. Here is part of my code... <?php error_reporting(E_ERROR | E_WARNING | E_PARSE); error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); error_reporting(E_ALL ^ E_NOTICE); error_reporting(E_ALL); // Report all PHP errors error_reporting(-1); if(isset($_POST['submit'])) { $imgurl = $_POST['imgurl']; $filename = $_POST['filename']; $filetype = $_POST['filetype']; $title = $_POST['title']; $fullurl = "<title>$title</title><img src=\"$imgurl\">"; $myFile = "$filename$filetype"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "$fullurl"; fwrite($fh, $stringData); fclose($fh); echo $fullurl ?> <br><br> <textarea cols="50" rows="10"><title><?php echo $title ?></title><img src="<?php echo $imgurl ?>"></textarea><br> Right Click <a href='./<?php echo "$filename$filetype"; ?>'>Here</a> and Click "Save as". <?php } else { ?> How can I make a button that says "DOWNLOAD" or something? Which will automatically execute that saving window. Thanks ahead of time.
  3. Do you want this gallery to open up in a new window?
  4. no i did not, im just asking if he'd be able to help me with it directly.
  5. okay, do have have an IM? that way you will be able to assist me in a better way. thank you.
  6. Heres the code: <?php $filename = "myfile.txt"; //first, obtain the data initially present in the text file $ini_handle = fopen($filename, "r"); $ini_contents = fread($ini_handle, filesize($filename)); fclose($ini_handle); //done obtaining initially present data //write new data to the file, along with the old data $handle = fopen($filename, "w+"); $writestring = "text to write to file\n" . $ini_contents; if (fwrite($handle, $writestring) === false) { echo "Cannot write to text file. <br />"; } fclose($handle); ?> How exactly do I link that with the results? Sorry im new to php. Thank you.
  7. So i have a generator where the user inputs the variable values and then it is automatically inserted in a code on the next page in a text box. How can I have the user then click on a button that says something like "Save" and will allow them to save that code in a .txt file? Please help
×
×
  • 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.