Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. its the control char for Vertical Tab (Chr 11)
  2. the path is, incorrect, it should be a URL ie <?php header("Location: users/".$session->username."/index.php"); ?> or <?php header("Location: http://www.domain.com/users/".$session->username."/index.php"); ?>
  3. your looking for Pagination: See here: http://Easy as PREV 1 2 3 NEXT
  4. i see, so like this, (requires a little clean up) $message = "<html><body><br><br><b>There were ".$rows." new submissions on ".$myDate."."; while ($data = mysql_fetch_assoc($rval)) { // Here is where the issue is. The tables are all connected on the nid field, and both vocabname and termname fields // can have multiple values for the same piece of content. Because of this, everything is getting put out multiple times. $gtitle = strtoupper($data["title"]); $Games[$gtitle][0] = "</b> <br><br> Submitted By: ".strtoupper($data["name"])."<Br> Program Title: ".$data["title"]; $Games[$gtitle][] = "<br>Program Description: ".$data["field_description_0_value"]." <br>".$data["vocabname"].": ".$data["termname"]; } foreach($Games as $game) { $message .= implode ("<br>", $game); $message .= "<br><br><hr>; } $to = "me@email.com"; $from = "admin@email.com"; $subject = "New Content"; $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; $message .= "</body></html>"; mail($to, $subject, $message, $headers); ?>
  5. can you print_r($date_data); a common problems is having the 5th param as a zero, which refers to, todays day..
  6. Really.. never had a problem myself!
  7. erm.. no use $day =(int) $day;
  8. Erm.. no your setting WebAddress to nothing.. i don't know actionscripts that well but this will always set it to nothing you need to pull the value from the form, like this Business = userBusiness.text; or with options maybe move the options code in.. ie if (option_2._visible=true) { WebAddress="No"; }
  9. its based by Title.. whats do you NOT want to be duplicated ?
  10. remember to uncomment the set the values to auth_'s ;auth_username= ;auth_password= ie auth_username=userbob auth_password=passfred if you have this working, please click solved!
  11. and that fails ? can you post that! post a sample include file and the code that calls it.. (one you have tested and you know doesn't work)
  12. add them to your PHP.INI file more info in the manual
  13. either that, or your need to write an XML extracter and create the table(s) from that, theirs no one line solution i can think of.. PHP & XML
  14. so you want to import an XML file into MySQL.. is this a one off or an on going action.. in other words is it something your be doing over and over ?
  15. where is the £20.00, coming from ? database, post etc ? little more code please
  16. can you post some code that fails
  17. Erm.. NO, we HELP..with problems, we don't write ie for you, try the freelance section
  18. i was worried about that.. windows machines add /r/n the end of the line, while *nix only adds /n (also a Macintosh only adds /r) try saving as text-only
  19. your check for a file before it exists.. if (is_writable($file)) it would probably be better to check that its a valid path and do you have permission to write to it ! if (is_dir($cwd) && is_writable($cwd) )
  20. by help you, you mean do it for you!
  21. Erm.. WHAT! thats wrong.. infact you should use / On Windows, both slash (/) and backslash (\) are used as directory separator character. In other environments, it is the forward slash (/). your thinking of ONLY windows servers,
  22. Okay let me make a few comments in your code <?php $filedir = $_GET["value"]; $cwd = getcwd(); if($filedir == "") { $filedir = "."; }else{ $cwd = $cwd."/".$filedir."/"; // concat paths $cwd = substr($cwd, 0, -1); // remove the last / } echo $cwd; if(is_readable($filedir)) //check the get "value" is readable ?????? { ?> <h1>Currently in <span class="red"><?php echo $cwd; ?></span></h1> <form action="<?=$PHP_SELF?>" method="post"> <div align="center"> <textarea rows="30" cols="80" style="border: 1px solid #666666;" name="updatedfile"> </textarea></div> <br /> <div id="center">Name of file: <input type="text" name="filename" id="filename" /><br /><div id="hidden"></div> <input type="submit" name="save" id="save" value="Save Changes" onclick="return checkIfEmpty(document.getElementById('filename').value)"> <?php if (isset($_POST['save'])) { //if the "save" button was clicked $file=$_POST['filename']; $file = $cwd.$file; //so now were missing the trailling / and appending a name! chdir($cwd);// this dir is unlikely yo exist!! if (is_writable($file)) { $data_to_save = $_POST["updatedfile"]; $data_to_save = eregi_replace("<END-TA-DO-NOT-EDIT>", "</textarea>", $data_to_save); $file2save = fopen($file, "w+"); if (fwrite($file2save,$data_to_save)) { //echo "<meta http-equiv='refresh' content='0;URL=MikesFileEditor.php'>"; echo "file saved!"; //Close file fclose($file2save); }else { //If write fails show failure page echo "file not saved!"; //Close file fclose($file2save); } }else { echo "not writable!"; } } } ?> Erm.. WHAT! thats wrong.. infact you should use / On Windows, both slash (/) and backslash (\) are used as directory separator character. In other environments, it is the forward slash (/). your thinking of ONLY windows servers,
  23. erm.. read the code, thats the question other will ask (because they don't have all your files!!)
  24. what! you want someone to tell you, your table name!! ???
×
×
  • 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.