Search found 974 matches

by seandisanti
Fri Sep 25, 2015 7:33 pm
Forum: PHP coding => Mail
Topic: webserver automatically emailing me a file
Replies: 0
Views: 876

Re: webserver automatically emailing me a file

how to open system installed files (Eg: vlc player , notepad , paint) .exe files inside Php window..only inside browser.. Do you mean to launch executables installed on the server via x forwarding, or do you mean installed on the system visiting the page? On properly configured systems neither shou...
by seandisanti
Fri Sep 25, 2015 7:24 pm
Forum: PHP coding => Images
Topic: Issues ripping PHP embedded images
Replies: 0
Views: 792

Re: Issues ripping PHP embedded images

There are lots of ways to do what you're trying, from grease monkey scripts, just entering some jquery or javascript into the console, or even curl. The preferred approach totally depends on the page you're trying to scrape. Let me know if you still need help
by seandisanti
Fri Sep 25, 2015 7:19 pm
Forum: PHP coding => Images
Topic: Thumbnails from MLS
Replies: 0
Views: 782

Re: Thumbnails from MLS

This one could be a little tricky without seeing any of the data, but a couple of things you can do to save yourself some headache. 1) Switch to pdo implementation instead of deprecated mysql_ extension. It's not causing your current issue, but it could cause others especially if you plan to upgrade...
by seandisanti
Fri Sep 25, 2015 6:45 pm
Forum: PHP coding => General
Topic: Issue On PHP Global Variable Concatenation and Assignment
Replies: 2
Views: 486

Re: Issue On PHP Global Variable Concatenation and Assignment

James's solution didn't work for me at all, and I've never been a fan of using the $GLOBALS superglobal. There are actually a lot of reasons to avoid using global variables, but that goes even more for that one. To answer your question though, you can use variable variables to get and set values fro...
by seandisanti
Fri Sep 25, 2015 6:14 pm
Forum: PHP coding => General
Topic: help with array
Replies: 1
Views: 380

Re: help with array

Also on an unrelated note, make sure that you have an htaccess or blank index page in your /wp-content/uploads folder. Some versions of wordpress don't by default which can result in people being able to list the contents of that directory and subdirectories which could be a very bad thing
by seandisanti
Fri Sep 25, 2015 6:08 pm
Forum: PHP coding => General
Topic: form post with control values in URL
Replies: 3
Views: 577

Re: form post with control values in URL

Here's a quick video from jream.com that shows passing form data with get, post, and request
https://www.youtube.com/watch?v=CEl3bhCBjtI
by seandisanti
Fri Sep 25, 2015 6:06 pm
Forum: PHP coding => General
Topic: I am not getting page numbers. can any one help me please
Replies: 0
Views: 237

Re: I am not getting page numbers. can any one help me please

What are you getting? Also your code is more readable if you put [ code=PHP] [ /code] around it (without the spaces)
by seandisanti
Fri Sep 25, 2015 6:04 pm
Forum: PHP coding => General
Topic: Downloading CSV files with curl
Replies: 0
Views: 253

Re: Downloading CSV files with curl

For some quick troubleshooting, make sure that the url loads the file when entered via browser. Also add some error handling. your curl_exec will return false on error. try throwing this block after your curl_exec...     if( ! $result = curl_exec($ch))     {         $msg = curl_error($ch);         e...
by seandisanti
Fri Sep 25, 2015 5:54 pm
Forum: PHP coding => General
Topic: A simple Select doesn't work...
Replies: 3
Views: 457

Re: A simple Select doesn't work...

@element121: var_dump($_POST['town']) results in string(15) "Great Falls " so the string is definitely getting through. @seandisanti: PDO sounds, and - from what I saw - looks very interesting. However, I am in the middle of setting up a new company and simply don't have the time to learn new stuff...
by seandisanti
Fri Sep 25, 2015 5:41 pm
Forum: PHP coding => General
Topic: How to detect where a function call came from..
Replies: 3
Views: 722

Re: How to detect where a function call came from..

Probably the easiest way would be to just explicitly pass the name of the calling function as a parameter to the function: <?php function whoSaidThat($phrase = '', $speaker = 'someone'){     return '"' . $phrase . '," ' . $speaker . ' said.<br />'; } function sean($tosay = ''){     echo whoSaidThat(...
by seandisanti
Fri Sep 25, 2015 5:27 pm
Forum: PHP coding => General
Topic: btn-cat-collapsed collapsed
Replies: 1
Views: 511

Re: btn-cat-collapsed collapsed

That's actually an issue with your bootstrap implementation rather than php. Are you able to list full source of the page, or give a link if it's web accessible? Feel free to PM if you do not want to share publicly
by seandisanti
Fri Sep 25, 2015 5:23 pm
Forum: PHP coding => General
Topic: Where is relevant code?
Replies: 1
Views: 448

Re: Where is relevant code?

Contact me via PM and I can walk you through this one
by seandisanti
Fri Sep 25, 2015 5:20 pm
Forum: PHP coding => General
Topic: Upload row to database
Replies: 0
Views: 258

Re: Upload row to database

Welcome aboard, and congrats on your effort. One thing to watch out for is the age of the tutorials that you're using. The mysql_ functions have been deprecated since php 5.5 and will be officially removed as of php 7 see http://php.net/manual/en/function.mysql-connect.php Don't worry though, pdo is...
by seandisanti
Fri Sep 25, 2015 5:08 pm
Forum: PHP coding => General
Topic: Star rating on click of Star image
Replies: 1
Views: 614

Re: Star rating on click of Star image

please use code tags, and is there a question? you should also be using PDO instead of mysql_ functions
by seandisanti
Fri Sep 25, 2015 5:01 pm
Forum: PHP coding => General
Topic: $_POST, Undefined index:
Replies: 2
Views: 453

Re: $_POST, Undefined index:

untested, but pretty standard so it should work without much trial and error: <?php // declaring these with default values so we can use them without verifying contents later $content = ''; $tdoc = ''; // see if tdoc has been supplied if (empty($_POST['tdoc']) == false){     $tdoc = $_POST['tdoc']; ...
by seandisanti
Fri Sep 25, 2015 4:31 pm
Forum: PHP coding => General
Topic: A simple Select doesn't work...
Replies: 3
Views: 457

Re: A simple Select doesn't work...

You shouldn't be using the mysql_ functions anymore. Take a look at PDO http://php.net/pdo It's faster and safer and can be used with procedural or object oriented implementations. There's a great tutorial video I always send people to at https://www.youtube.com/watch?v=dF8hoPj-1bc from the guy at J...
by seandisanti
Tue Mar 24, 2015 1:20 pm
Forum: PHP coding => General
Topic: Selected Template to display Monitor
Replies: 0
Views: 391

Re: Selected Template to display Monitor

Without code it's tough to see what you're working with.
by seandisanti
Tue Mar 24, 2015 1:17 pm
Forum: PHP coding => General
Topic: Search Username & Password and the verify status
Replies: 2
Views: 674

Re: Search Username & Password and the verify status

You also shouldn't store plain text or md5 hashed passwords in your database. You should use a one way encryption scheme with a reset rather than retrieval for forgotten passwords. There are examples on this forum and all over the internet of how to do this properly.
by seandisanti
Tue Mar 24, 2015 1:13 pm
Forum: PHP coding => General
Topic: user/admin login not working
Replies: 2
Views: 1024

Re: user/admin login not working

Whether stated or not, secure code should ALWAYS be your objective.
by seandisanti
Sun Feb 01, 2015 11:21 pm
Forum: PHP coding => General
Topic: Xml to php array not working???
Replies: 1
Views: 472

Re: Xml to php array not working???

simplexml_load_file doesn't return an array, it returns a SimpleXMLElement object. Try:

Code: Select all

$xml = simplexml_load_file('trend.xml');
print_r($xml);
 
by seandisanti
Sun Feb 01, 2015 11:16 pm
Forum: PHP coding => General
Topic: Accessing data and changing it in joomla
Replies: 0
Views: 315

Re: Accessing data and changing it in joomla

You may have better luck on a forum aimed at more specifically at joomla.
by seandisanti
Sun Feb 01, 2015 11:12 pm
Forum: PHP coding => General
Topic: A Little help please.
Replies: 10
Views: 965

Re: A Little help please.

Go to your generated page, then view source, I think you'll see a couple of issues there. You're looping your <body> tag, and you're nesting tables inside of tables inside of tables. Typically when you're creating a table based on values in a database, you want to lay out the table and headers first...
by seandisanti
Sun Feb 01, 2015 11:03 pm
Forum: PHP coding => General
Topic: Undefined Index Error- Creating a Story Generator
Replies: 0
Views: 283

Re: Undefined Index Error- Creating a Story Generator

Look into isset() and empty() to check if a variable has been initialized
by seandisanti
Wed Jan 28, 2015 9:12 am
Forum: PHP coding => General
Topic: Insert ID of value(item) selected from dropdown PHP Mysql
Replies: 0
Views: 844

Re: Insert ID of value(item) selected from dropdown PHP Mysql

You should use PDO ( http://php.net/pdo ) for database interactivity, but you're not actually doing anything with your code. The form doesn't post anywhere, so the selected value doesn't actually get passed. Here's a short video tutorial by Jesse Boyer from jream.com explaining passing values with g...
by seandisanti
Wed Jan 28, 2015 9:07 am
Forum: PHP coding => General
Topic: Creating multi type user system approach
Replies: 1
Views: 677

Re: Creating multi type user system approach

Mvc frameworks have definite strengths and weaknesses, but weren't really part of the question or answer given. You do not necessarily need an mvc approach for an object oriented implementation, and building out models, views, controllers, and associated database structures correctly can be at least...