-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
its the control char for Vertical Tab (Chr 11)
-
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"); ?>
-
show php/mysql results only X number per page...
MadTechie replied to otamendi's topic in PHP Coding Help
your looking for Pagination: See here: http://Easy as PREV 1 2 3 NEXT -
Redundant data display based on multi-value fields -- Newbie Help!!!!
MadTechie replied to sw9's topic in PHP Coding Help
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); ?> -
can you print_r($date_data); a common problems is having the 5th param as a zero, which refers to, todays day..
-
Really.. never had a problem myself!
-
erm.. no use $day =(int) $day;
-
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"; }
-
Redundant data display based on multi-value fields -- Newbie Help!!!!
MadTechie replied to sw9's topic in PHP Coding Help
its based by Title.. whats do you NOT want to be duplicated ? -
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!
-
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)
-
add them to your PHP.INI file more info in the manual
-
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
-
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 ?
-
[SOLVED] strange charactor when sending mail
MadTechie replied to ldoozer's topic in PHP Coding Help
where is the £20.00, coming from ? database, post etc ? little more code please -
can you post some code that fails
-
Erm.. NO, we HELP..with problems, we don't write ie for you, try the freelance section
-
[SOLVED] ftp_put - Adds empty lines between every line on upload.
MadTechie replied to haaglin's topic in PHP Coding Help
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 -
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) )
-
by help you, you mean do it for you!
-
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,
-
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,
-
okay.. so
-
erm.. read the code, thats the question other will ask (because they don't have all your files!!)
-
what! you want someone to tell you, your table name!! ???