Search found 2192 matches

by egami
Tue Apr 23, 2013 12:56 pm
Forum: PHP Scripts
Topic: Quick question about storing image NAMES in MySQL
Replies: 1
Views: 959

Re: Quick question about storing image NAMES in MySQL

you can use varchar, and limit the amount of characters in a name... varchar(15) for example. Or, you can use tinytext, text, blob.. I would use varchar(21). This gives you 17 characters for a name, a period and 3 letter extension. You would need to have some sort of filter to make sure the name fit...
by egami
Tue Apr 16, 2013 1:35 pm
Forum: mySQL & php coding
Topic: sort data using button
Replies: 1
Views: 723

Re: sort data using button

This is best done with JQuery and is slightly complicated. You can do it with a Session or Post variable, just do a check at the top of your script to see if the variable is set, and use that to sort your table.
by egami
Tue Apr 16, 2013 1:34 pm
Forum: mySQL & php coding
Topic: php complex form
Replies: 1
Views: 1023

Re: php complex form

Make an $array of all of the key data you want to verify. then.. foreach($array as $k => $v) {   $outarray = array();   if (!isset($_POST[$k]) || $_POST[$k] != '') {      $outarray[$k] = "$k was not set or invalid.";   } } if (count($outarray > 1)) {    foreach($outarray as $k => $v) {      echo "<p...
by egami
Tue Apr 16, 2013 1:28 pm
Forum: mySQL & php coding
Topic: Passing data from one page to another and back
Replies: 4
Views: 1273

Re: Passing data from one page to another and back

investigate _SESSION
by egami
Tue Apr 16, 2013 1:27 pm
Forum: mySQL & php coding
Topic: Searching the Exact Phrase in Mysql
Replies: 0
Views: 575

Re: Searching the Exact Phrase in Mysql

by default, SQL already searches via exact phrase.


Ie.


$a = "This helps me a lot"

$query = "SELECT * FROM myTable WHERE value='$a'"

Will look for anything that contains "This helps me a lot" (Depending on your table setup, this may or may not be case sensitive so be wise).
by egami
Tue Apr 16, 2013 1:25 pm
Forum: mySQL & php coding
Topic: Each row problem.
Replies: 1
Views: 991

Re: Each row problem.

Yep
by egami
Fri Mar 29, 2013 8:18 am
Forum: PHP coding => Mail
Topic: mail not being sent !!!!!
Replies: 1
Views: 2926

Re: mail not being sent !!!!!

$from = $_POST['from'];
$header = $from;

This is probably your problem.

$header should look something similar to:

$header = "FROM: my@email.address.com \r\n";


So, to make your script work.. something like..

$header = "FROM: $from \r\n";

Give that a shot.
by egami
Fri Mar 29, 2013 8:14 am
Forum: PHP General
Topic: function.inc.php error
Replies: 0
Views: 752

Re: function.inc.php error

you have to "escape" the < bracket.

ie..

if(!preg_match("\<?",$member_db_line)){
by egami
Fri Mar 29, 2013 8:08 am
Forum: Your Scripts
Topic: Contact me form error
Replies: 0
Views: 1299

Re: Contact me form error

make sure that $_POST['name'] is actually defined and is a valid email format.
by egami
Fri Mar 29, 2013 8:07 am
Forum: mySQL & php coding
Topic: Each row problem.
Replies: 1
Views: 991

Re: Each row problem.

change fetch_array to fetch_assoc
by egami
Fri Mar 22, 2013 12:24 pm
Forum: PHP coding => General
Topic: What is safer way to send data - in $_GET or curl headers?
Replies: 2
Views: 1090

Re: What is safer way to send data - in $_GET or curl header

I would use cURL & the HTML POST feature, over HTTPS.


Just my $.02
by egami
Mon Dec 17, 2012 10:38 am
Forum: PHP coding => General
Topic: php/mysql help
Replies: 1
Views: 2606

Re: php/mysql help

HTML uses <br> to line break.
by egami
Fri Dec 14, 2012 8:53 am
Forum: PHP coding => General
Topic: Exec functions with php
Replies: 0
Views: 2188

Re: Exec functions with php

Two things to remember. 1. If you're trying to run a shell argument from the webserver, the shell is being run as "apache" or "nobody" depending on your distro.. Thus, you'll need to make sure that this user has sudo privis in order to run the commands in question. 2. When you run the PHP script in ...
by egami
Fri Dec 14, 2012 8:51 am
Forum: PHP coding => General
Topic: Send Shell commands without interactive shell
Replies: 0
Views: 3109

Re: Send Shell commands without interactive shell

Not possible. If there isn't a shell, there isn't a shell. And giving the WWW user administrative privis on any of your boxes is a 100% idiotic move, especially an Internet facing facility. Even sudo would be a dumb move. But, I'm not one to judge, so if you want it to even have any kind of possibil...
by egami
Fri Dec 14, 2012 8:48 am
Forum: PHP coding => General
Topic: How to call a controller function on a link in joomla 3.0
Replies: 1
Views: 2244

Re: How to call a controller function on a link in joomla 3.

this may be better asked on a joomla forum.
by egami
Fri Dec 14, 2012 8:46 am
Forum: PHP coding => Mail
Topic: Sending Email to Different Address Based on Certain Criteria
Replies: 0
Views: 2420

Re: Sending Email to Different Address Based on Certain Crit

if ($_POST['whatever'] == 'A') {
$email = "thisemail@address.com";
} elseif ($_POST['whatever'] == 'B') {
$email = "theotheremail@address.com";
} else {
$email = "defaultemail@address.com";
}


done.
by egami
Fri Dec 14, 2012 8:44 am
Forum: PHP coding => Mail
Topic: Mail Mass Sender PHP Script Help
Replies: 0
Views: 2159

Re: Mail Mass Sender PHP Script Help

Both of you will need to look into crontab jobs.
by egami
Fri Dec 14, 2012 8:44 am
Forum: PHP coding => Mail
Topic: Implement delay
Replies: 0
Views: 1132

Re: Implement delay

I am going to go out on a limb here and say, no. A script's maximum execution time (may or may not be modified, depends on your provider) won't allow you to do this. The only way it can be done is by using some sort of crontab and marking the email addresses as "sent" so that every 15 minutes when y...
by egami
Mon Dec 03, 2012 2:17 pm
Forum: PHP coding => General
Topic: Urgent Required .. php to exe
Replies: 0
Views: 1300

Re: Urgent Required .. php to exe

AFIAK, that's not possible.
by egami
Mon Dec 03, 2012 9:09 am
Forum: PHP coding => General
Topic: Remember variables
Replies: 1
Views: 1528

Re: Remember variables

Do a bit of research on sessions.

www.php.net/sessions
by egami
Wed Nov 28, 2012 2:20 pm
Forum: JavaScript
Topic: computer network
Replies: 3
Views: 1576

Re: computer network

His sig wasn't in it the first time.. but I took care of that.
by egami
Mon Nov 19, 2012 8:55 am
Forum: JavaScript
Topic: computer network
Replies: 3
Views: 1576

Re: computer network

What does this have to do with JavaScript, or PHP?
by egami
Wed Nov 14, 2012 4:13 pm
Forum: PHP Jobs
Topic: Php Developer
Replies: 1
Views: 1358

Re: Php Developer

awesome! where do I sign up?
by egami
Wed Nov 14, 2012 4:11 pm
Forum: PHP General
Topic: Help! How to access Facebook page source with php?
Replies: 1
Views: 943

Re: Help! How to access Facebook page source with php?

ahh, young grasshopper... Facebook requires... authentication.
by egami
Wed Nov 14, 2012 4:10 pm
Forum: PHP General
Topic: Revenue for the week
Replies: 2
Views: 1028

Re: Revenue for the week

lol