Jump to content

Don E

Members
  • Content count

    971
  • Joined

  • Last visited

  • Days Won

    24

Don E last won the day on March 14 2016

Don E had the most liked content!

Community Reputation

122 Excellent

About Don E

  • Rank
    Invested Member
  • Birthday November 3

Contact Methods

  • Website URL
    http://EditThis.net
  • ICQ
    0

Profile Information

  • Gender
    Male
  • Location
    Michigan
  1. How Can Select First Paragraph select in a Post

    Yes, good notice. Edit: $firstPara = substr($post, 0, strpos($post, '</p>'));
  2. How Can Select First Paragraph select in a Post

    One thing you can try, depending on how the paragraphs are stored, meaning if you have something like this for one $post: <p>This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.</p> <p>This is another paragraph. This is another paragraph. This is another paragraph from same post.</p> You can use PHP substr function along with strpos to try and get the first paragraph like: $firstPara = substr($post, 0, strpos(‘</p>’, $post)); This should retrieve the first paragraph.
  3. How Can Select First Paragraph select in a Post

    You can try checking out the SUBSTR MySQL function(s). https://www.w3schools.com/sql/func_mysql_substr.asp
  4. edit button on php table created from sql DB

    Last time i checked GET is for query strings (using <a> tag, although can be applied to form via method get) which is what you mentioned in your post. But okay man.
  5. edit button on php table created from sql DB

    dsonesuk is referring to using <a> tag. Like: <a href="edituser.php?cust_id=n">Edit User</a>
  6. The cookie/session that is being set in the browser is only an identifier. The browser sends the identifier back to the server for PHP to retrieve the data for that identifier(cookie/session data) which is on the server. Basically what JSG meant here:
  7. Canvas question

    Thanks Foxy Mod for that code snippet, was able to figure out. Also thanks dsonesuk.
  8. Canvas question

    Yes you're correct. The only thing with that is, if I draw on the canvas where the canvas has been scaled down by CSS, you get the result below(see link), the mouse is not matching with the drawn lines. This is expected because the actual drawing is happening on the canvas's width and height dimensions which in this case is: 670x470 but the scaling is: 255x168 Is there anyway to have the mouse match up with the drawing when the image is scaled? Video Demo Thanks.
  9. Canvas question

    I see, but is it possible to output the canvas(in this case an image that has lines drawn on it) to the browser with the original dimensions(width and height) of the image? So if the canvas is rendered down to 300x300 because of responsive design and we load an image into it, yes the image takes on the dimensions of the canvas which would be 300x300 but I was wondering if we can output the edited canvas image back out to 600x600 (original dimensions)? For i.e., the A4(smaller) print now can be printed into a poster(bigger) for example. Would be nice if we can take a canvas at a certain size and output it as a different size(bigger in this case) and still maintain all it's data.
  10. Canvas question

    Hello everyone, I have a question about the HTML canvas element. If loading an image into a canvas where the canvas has been scaled down to a smaller size because of responsive design, say for example 300 by 300, how can then after playing in the canvas get the original size of the image for the canvas upon out putting to the browser to download? So for example, original image size may be: 600x600. Loading it into a canvas that is being rendered responsive is scaled to: 300x300. Upon finishing playing with the image in the canvas, how can I get a 600x600 version of it instead of the scaled size which is 300x300? I've noticed that whatever the canvas width and height is set to, you will get that size for your output, which is fine but if an image is loaded into the canvas, it would be nice upon output to output as the original width and height for the canvas. Appreciate it in advance. Thanks!
  11. Cron job -- linux

    You can place the file.php in a directory other than the public_html directory since everything in the public_html directory is accessible by the public. For example, you can create a folder(directory) for cron job files in your home or username directory and call the file from there for the cron job: /usr/local/cpanel/bin/jailshell -q /home/my_username/cron_jobs/file.php
  12. Cron job -- linux

    Are you running the first cron job with the colons? /usr/local/cpanel/bin/jailshell: -c: /home/my_username/public_html/folder/file.php" Try removing the colons and also the double quote at the ends of the cron jobs.
  13. how to escape from unwanted marriage

    Something is telling me they are serious.
  14. Just thought I'd share this video course on JavaScript for those who may be interested. https://www.udemy.com/understand-javascript/ The course original price is $175 but there is a sale going on until Mar 1 where you can get it for $10. I'm not affiliated with udemy or anything. Just thought maybe someone would like to take advantage of the sale. It's a very good course for those who want to delve deep into JavaScript or enhance their JavaScript knowledge for a little cost. ??
  15. Yes good point, I agree when it comes to time.
×