Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. will that really help maybe www,google,com www[dot]google[dot]com www google com
  2. if the full path isn't working then theirs a bigger problem.. unless you entered it incorrectly
  3. PHP is a server side script.. so you can't maybe javascript (lol)
  4. maybe use the full path /home/public_html/includes or dirname(__FILE__)."/../includes/z.php"
  5. Yep.. example thefile.php?A=123&B=456&x=huh echo $_GET['A']; echo $_GET['B']; echo $_GET['X']; //Note it should be x not X
  6. infact thorp i have a question also i had a script which i moved from one server to another and it stopped working.. it was down to the fact i used <?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/z.php'; ?> , which was pretty standard in my code.. instead i used dirname(__FILE__)."/../includes/z.php" , which seams to work but is their a "standard" ?
  7. Erm.. using a form drop down box with the vaules as $myrow[userid]'s and a submit button.. have the action point to edit_user.php.. thats the idea but i am not writing it for you as its kinda basic and this is a learning site!
  8. try include("../includes/z.php");
  9. I'll settle for the "Topic Solved" button being pressed (if we're done) Topic Solved button (bottom left)
  10. Huh!! is their a php question in that post? include
  11. this is your system thus your standard.. without knowing the system as well as you do its very hard to say!!
  12. Pass the records ID (a unique ID) to the details.php like this details.php?id=123 the 123 is the ID, in the details.php file use $ID = $_GET['id'] //$ID will equal 123 now to get that id, then use that to search the database again for the rest of the details
  13. i have a database with the paths and ID's i then use download.php?id=1010 and get the 1010 and find the path in the database
  14. OK change Code: <?php $fp = fopen("DCS.txt","w"); // $fp is now the file pointer to file $filename if($fp){ //print ($data); fwrite($fp,$data); // Write information to the file fclose($fp); // Close the file echo "File saved successfully"; } else { echo "Error saving file!"; } ?> to <?php $fp = fopen("DCS.txt","w"); // $fp is now the file pointer to file $filename if($fp){ //filter $data= str_replace("'", "", $data); $data= str_replace('"', "", $data); fwrite($fp,$data); // Write information to the file fclose($fp); // Close the file echo "File saved successfully"; } else { echo "Error saving file!"; } ?>
  15. you need ZZIPlib for those functions <?php //check if zziplib is installed if(function_exists('zip_open()')){ if (zip_open($filename) === TRUE) { } }else{ echo "ZZIPlib NOT installed"; } Note that ZZIPlib only provides a subset of functions provided in a full implementation of the ZIP compression algorithm and can only read ZIP file archives. A normal ZIP utility is needed to create the ZIP file archives read by this library. download zziplib from http://zziplib.sourceforge.net/ if needed
  16. can you post the SQL statements then!!
  17. when i said a new window i mean a script that does the download of the file only, and the current window continues as normal.
  18. i don't really think its a header issule. basically readfile is parsing to the current window.. so that session is going to be busy until its finished.. hence another window idea.. maybe chucks will work better! (either that or a frameset lol) <?php function readfile_chunked ($filename) { $chunksize = 1*(1024*1024); // how many bytes per chunk $buffer = ''; $handle = fopen($filename, 'rb'); if ($handle === false) { return false; } while (!feof($handle)) { $buffer = fread($handle, $chunksize); print $buffer; } return fclose($handle); } ?>
  19. you lost me but if you using NULL then either use is_null or isset or ="NULL" ??
  20. i just built them as one for testing it seams ok <body> <style type="text/css"> <!-- .style4 {color:red} --> </style> <?php if( isset($_POST['dropdownbox']) ) { $name = $_POST['name']; $lastname = $_POST['lastname']; $email = $_POST['email']; $selecter = $_POST['dropdownbox']; $errors = ""; if (empty($name)){ $errors .="<span class='style4'>"."*The name field has not been filled out <br>"."</span>"; } if (empty($lastname)) { $errors .="<span class='style4'>"."*The last name field has not been filled out <br>"."</span>"; } if (empty($email)) { $errors .="<span class='style4'>"."*The email field has not been filled out <br>"."</span>"; } if( !strstr ($email, "@" ) ) { $errors .= "<span class='style4'>"."*Invalid e-mail<br>"."</span>"; } if( !strstr ($email, "." ) ) { $errors .= "<span class='style4'>"."*Invalid e-mail<br>"."</span>"; } if ($selecter == "chooseone" ) { $errors .= "<span class='style4'>"."*You need to choose a Profession<br>"."</span>"; } if (empty($errors)){ echo "Thanks for filling out our form"; }else { echo $errors; //include ("_form.php"); } } if (isset($_POST['name'])) { $name_temp = $_POST['name']; } else { $name_temp = ""; } if (isset($_POST['lastname'])) { $lastname_temp = $_POST['lastname']; } else { $lastname_temp = ""; } if (isset($_POST['email'])) { $email_temp = $_POST['email']; } else { $email_temp = ""; } ?> <caption color="red">All Fields Are Required</caption> <table border="1"> <form method="post"> <tr><td>Name:<input type="text" name="<? echo $name_temp; ?>" /><br /></td></tr> <tr><td>Last Name: <input type="text" name="<? echo $lastname_temp; ?>" /></td></tr> <tr><td>E-mail:<input type="text" name="<? echo $email_temp; ?>" /></td></tr> </table> <select name="dropdownbox"> <option value="chooseone" selected >--Choose one--</option> <option value="webmaster" <? if ($selecter=="webmaster") { echo " selected"; } ?>>Web Master</option> <option value="programmer" <? if ($selecter=="programmer") { echo " selected"; } ?>>Programmer</option> <option value="manager" name="selecter"<? if ($selecter=="manager") { echo " selected"; } ?>>Manager</option> <option value="serveradministrator" <? if ($selecter=="serveradministrator") { echo " selected"; } ?>>Server Administrator</option> </select> <br /> <input type="radio" name="button1" value"subscribe" checked />I wish to subscribe <input type="radio" name="button1" value"dontsubscribe" />No, I do not wish to subscribe <input type="submit" value="Submit" /> </form> </body>
  21. i use this (for zips) header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=".basename($archiveName).";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($archiveName)); readfile("$archiveName"); give that a go
  22. heres a few <?php echo $rowU1['username'].", ".$rowU1['firstName']; ?> <?php echo "{$rowU1['username']}, {$rowU1['firstName']}"; ?> <?php echo $rowU1['username']; echo ", "; echo $rowU1['firstName']; ?> <?php $un =$rowU1['username']; $fn =$rowU1['firstName']; echo "$un, $fn"; ?>
  23. zip spans.. also whats the "problem".. either that or see the freelance section!
  24. is the download opening another window ? by windows setting the target to "_blank" ? that seams to work fine for me
  25. workout the design on the table then work from their.. to add the data you have already you could create a basic page to list the files and format the text like an insert sql statement then post that in myphpadmin.. just an idea!
×
×
  • 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.