Jump to content

sildona

Members
  • Posts

    19
  • Joined

  • Last visited

sildona's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. First, Jessica and Picachu2000 I really want to thank you both for putting up with my questions. I mean that. My background is English, and I get annoyed with people who don't appreciate or don't really want to learn what I think is very important. However, as an educator, even when I'm annoyed, I provide specific answers to specific questions I find tedious. Students of English are not always at the same point in their writing careers, and if they don't care--if they only want the answer--making their lives difficult only makes them resent me as well as the subject matter. Making their lives easy ... a.k.a, improving their lives ... in a way that serves their function rather than mine, keeps them close to the subject and will enable them to re-approach the topic at some later time with a positive mindset. Although teaching coding is similar to teaching writing, it's more like teaching business writing. Students of business writing have specific goals .. how to write a pitch, how to draft a business plan, how to do a PR, etc. Their mindset is functional rather than conceptual, and although they understand the importance of grammar and syntax, neither are their primary concern. Why? Because they are business people who can have a colleague proof the letter. When it comes to coding, I'm similar to the business-writing student. I have specific goals. I don't really give a can of shit about the security of the code because I have to get a working model in place that will allow me to conduct a private beta-testing, something I can run by others. Following that, I will pay someone to make code the site and fill in all the gaps, so to speak. So again, I really thank everyone in these forums for putting up with questioners of a business mindset. You people really find us annoying. Sorry. That said, considering myself an idea man, this is my idea: Think of a forum as an a single entity. Forums are amusing, very schizo places. Going back over not only this thread but over others, the overall personality is a mercurial. Although they are comprised of many users, think of PHP Freaks as PHP Freak. Religious: arguing about the absolute best, most moral way to code something: Bitter: don't want to dole out a single example because coders are angry about "spoon-feeding. ADHD: getting sidetracked away from the topic. Passive-Helpful: conceptual answers without specific examples (this is very close to #2. Helpful: conceptual answers with examples Chatty, Friendly: between questioners and regular users Identify other characteristics, say 10 total. Problems (market or audience) Supposing the singularity will be a hive mind, how to predict the personality that will win out (and therefore the nature of existence) Entertainment - perhaps a game Think of some more markets or audiences Code the Solution Write program that mimics or uses the forum model as a metaphor In terms of Problem #1 -- think of earthquake prediction ... input a lot of variables -- output earthquake predictions & effects. Similar thing: input various personality or objective survival goals and output the Singularity hive mind's most probably "personality" or "nature of existence." Entertainment (or even functional) Think of Yahoo! Answers, and model a visual site that uses the forum as a model ... A sort of schizo virtual assistant ... these already exist, but do any of them have a personality of anything other than an encyclopedia that has undergone customer service 101 training? OR program a forum-based virtual assistant -- a sort of Schizo sage -- that seeks to identify the questioner and give an answer that bests suits the person rather than the question ... many people might find this maddening. But designed and marketed properly, it could be like some wise mentor of sorts that frames answers like a zen koan. Sort of like Harry Potter getting seemingly confusing answers from Dumbledore. I don't have the time, knowledge, or inclination to start the above project, but it could be interesting and profitable if done right. Best
  2. http://stackoverflow.com/questions/8110309/php-print-css-style echo "<span class='blocks'> $imgrow[blocks]<span>"; Works. Thanks all for putting up with my questions.
  3. Of course I'm doing something wrong. This works. echo stripslashes($imgrow[blocks])." <br/>"; It's nice and gray, and the line breaks as needed. What I would really like is for the blocks variable to be red.
  4. I don't want to write perfect code. I want workable code. I don't know if the stripslashes are needed, but the "blocks" variable comes from a form that inputs some data that may or may not have comma's or other stuff in it, so I added the stripslashes. Is that wrong? If it is, I don't mind. They don't give me error messages. They do allow the text to echo as its entered. I don't need a better, more pure, more esoteric way of doing this. I just need the output to be a certain color, which means calling the CSS file, which I swear to God is not making sense to me.
  5. I really don't get this -- why would want to include more line-break tags? Really, I can write HTML well enough, so that it works. I can work my way through CSS just fine, and when I can't, tutorials help. But I'm not understanding how to wrap PHP echo statements with HTML. I just need to change the color of a measly piece of text. Telling me the concept isn't going to work. An example might be nice. In carpentry, for example, telling someone how to frame a wall and showing someone is the difference between some true and a not-very true corners. I have tried about 18 different examples from tutorials placed online, and if I just flat out copy and past them in a new php file, they still tend not to work. It's like everyone has a library of different, non-working examples. For example: echo "<div class='cars'>" ($variable[cars]). "</div>"; doesn't work. Yet I'm told it should. But I'm telling you ... it ain't happenin'. Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /............ eval()’d code on line 68 Any help anyone?
  6. I have the style sheet called in the PHP file's head. It's the wrapping in html markup that's throwing me. echo <style="color: $fff;" stripslashes($imgrow[blocks]). "<br/>"; echo stripslashes($imgrow[blocks])." <br/>"; echo "<div class='blocks'></div>";
  7. Without PHP, yes. I just call the CSS file at the beginning of the page then modify the CSS file as necessary. Same thing?
  8. I have echo "# blocks: "; echo stripslashes($imgrow[blocks]). "<br/>"; and the CSS is .blocks{ width:25px; color:#D82B2B; } How do I apply the CSS color to the Echo statement? I've looked at various tutorials, and it's not making sense.
  9. I cannot figure out how to add this tooltip snippet $tooltips = Array("Prison"=>"This word is word number 1", "Word2"=>"This word is word number 2"); $content = "Here are Word1 and Word2"; foreach ($tooltips as $word=>$tip){ $content = preg_replace("/(".$word.")/", "<span title='".$tip."'>$1</span>", $content); } echo $content; to the following image displayed from a database echo "<img src='".$showimage."' height='200px' width='133px' />"; every time I try to call the variable $showimage in the tooltip, it comes out as a bunch of error messages and text. Any help would be greatly appreciated.
  10. I have a PHP file that shows thumbnails, but I would like to add a tooltip that shows up when I hover the mouse over the thumbnail. echo "<img src='".$showimage."' height='200px' width='133px' />"; Thanks in advance!
  11. I deleted the line, but I still received an error: failed to open stream: Is a directory in .... [site directory] What is "Is" as directory? I did a search for Is and for directory in case I had some typos. Not finding anything.
  12. The following error messages 1. [function.move-uploaded-file]: failed to open stream: No such file or directory 2. Unable to move '/tmp/coded file name' to .... [directory] result from the following code. <?php //This is the directory where images will be saved $target = "images/"; $target = $target . basename( $_FILES['image']['name']); //This gets all the other information from the form $first_name=$_POST['first_name']; $last_name=$_POST['last_name']; $email=$_POST['email']; $image=($_FILES['image']['name']); // Connects to your Database include "connect.php"; //Writes the information to the database mysql_query ( "INSERT INTO `database`(`first_name`,`last_name`,`email`,`image`,) VALUES ('$first_name','$last_name','$email','$image',)" ); //Writes the photo to the server if(move_uploaded_file($_FILES['image']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?> Any help would be GREATLY apprecaited!!
  13. Does anyone know of a PHP snippet of code that will 1. Obtain the file name off the file 2. Insert the file name into a database 3. upload the actual file to a directory I have the HTML form that sends the information, and I know how to connect to the database. I just need to know how to modify my PHP form processing file. Thanks for any leads!
×
×
  • 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.