Search found 20 matches

by pickyj
Fri Feb 25, 2011 6:49 am
Forum: PHP Scripts
Topic: News Publishing script required..
Replies: 2
Views: 785

Re: News Publishing script required..

no pay no gain... :D
by pickyj
Fri Feb 25, 2011 6:37 am
Forum: PHP Jobs
Topic: WTB Some Help!
Replies: 0
Views: 714

Re: WTB Some Help!

send me more info by PM...
by pickyj
Thu Feb 24, 2011 4:41 am
Forum: PHP coding => General
Topic: dynamic if statement
Replies: 1
Views: 1195

Re: dynamic if statement

no... this is wrong...
try this:

Code: Select all

$var1 = "($varA == 1) && ($varB == 2)";
$ifvars=array('1'=>$varA,
   '2'=>'1',
   '3'=>$varB,
   '4'=>'2');

if ($ifvars['1'] == $ifvars['2'] && $ifvars['3'] == $ifvars['4']){
   //a bunch of other code
}
I hope that helps...
by pickyj
Wed Feb 09, 2011 10:04 am
Forum: PHP coding => Images
Topic: Image not uploadng............................
Replies: 3
Views: 917

Re: Image not uploadng............................

$query = "INSERT INTO socialdb(fname,lname,gender,dob,phone,email,location,zipcode,image) VALUES('".$fname."','".$lname."','".$gender."','".$dob."','".$phone."','".$email."','".$location."','".$zipcode."','".$data."')"; try this... also, remove the second parameter of mysql_query() NOTE: try the [ ...
by pickyj
Wed Feb 09, 2011 10:00 am
Forum: PHP coding => General
Topic: how to put option in select dropdown list with php
Replies: 0
Views: 381

Re: how to put option in select dropdown list with php

print SELECTED into the selected option tag
example:

Code: Select all

<?php
$row=mysql_query("SELECT * FROM table");
<select name="567">
  <option value="123" <?php if($row['567']=='123') echo "SELECTED"; ?>/>
  <option value="321" <?php if($row['567']=='321') echo "SELECTED"; ?>/>
</select>
by pickyj
Wed Feb 09, 2011 9:50 am
Forum: mySQL & php coding
Topic: Checking for blank fields in form
Replies: 3
Views: 662

Re: Checking for blank fields in form

empty() function... if var is empty, returns true and isset() function that returns true if var isn't empty example: <?php if(empty($emptyvar)) echo "1st var is empty"; if(!isset($emptyvar)) echo "1st var is empty"; // [b]EXACTLY[/b] the same check $emptyvar=123; if(empty($emptyvar)) echo "1st var i...
by pickyj
Tue Feb 08, 2011 1:14 pm
Forum: PHP coding => General
Topic: Using a PHP variable in a mysql query
Replies: 1
Views: 447

Re: Using a PHP variable in a mysql query

1st use the [ code ][ /code ] (without spaces) tags... make the code easier to read 2nd any of this querys won't work... (take a look on PHP's variables) example.php: <?php // If the user have submit the type var, update the DB if (isset($_POST['type'])) { $type=$_POST['type']; $query="SELECT * FROM...
by pickyj
Tue Feb 08, 2011 1:02 pm
Forum: PHP coding => General
Topic: problem with do-while and mysql
Replies: 0
Views: 401

Re: problem with do-while and mysql

Hmm... At first, crappy code... :oops: Try this (however, the subsections will be the same for both sections) <?php $sections="SELECT * FROM sections WHERE id='"._POST['id']."'"; while ($row_sections=mysql_fetch_array($sections)) { $subsections="SELECT * FROM sections WHERE dependent='"._POST['id']....
by pickyj
Tue Feb 08, 2011 12:46 pm
Forum: PHP coding => General
Topic: Generating a SHA1 password result.
Replies: 2
Views: 1036

Re: Generating a SHA1 password result.

ChrisCanfield wrote:For $string= do i put what the local chars table holds?
:? could you explain?
by pickyj
Tue Feb 08, 2011 5:00 am
Forum: PHP coding => General
Topic: Generating a SHA1 password result.
Replies: 2
Views: 1036

Re: Generating a SHA1 password result.

Ok, sorry... :(
try this:

Code: Select all

<?php
$string="String to encrypt";
$encrypted=sha1($string);

echo $encrypted;
?>
I hope it's helpful... :D
by pickyj
Tue Feb 08, 2011 4:54 am
Forum: mySQL & php coding
Topic: How to insert List data in MySQL row?
Replies: 3
Views: 605

Re: How to insert List data in MySQL row?

You're welcome bro! :D
by pickyj
Mon Feb 07, 2011 8:39 am
Forum: PHP General
Topic: Script Pause
Replies: 1
Views: 630

Re: Script Pause

Hmmm... I found this http://www.webmasterworld.com/html/3049612.htm
check the <meta...>
I haven't tried that, but seems to work... :?
by pickyj
Mon Feb 07, 2011 8:35 am
Forum: PHP coding => General
Topic: HTTP Post method in PHP
Replies: 1
Views: 393

Re: HTTP Post method in PHP

I haven't tried CURL, but it's surely easier with a simple HTML form... example.php: <?php if (isset($_POST['text1'])){ echo "text1: ".$_POST['text1']; echo "text2: ".$_POST['text2']; }else{ ?> <form action="example.php" method="POST"> <p>Text1: <input type="text" name="text1" /> <p>Text2: <input ty...
by pickyj
Mon Feb 07, 2011 8:28 am
Forum: PHP coding => General
Topic: Posting data to the database
Replies: 2
Views: 516

Re: Posting data to the database

<?php session_start(); include 'db.php'; ?> <html> <body> <?php $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $from = $_SESSION['username']; echo $to; echo $from; echo $subject; echo $message; mysql_query("INSERT INTO mail ('to', 'from', 'subject', 'message') VALUE...
by pickyj
Mon Feb 07, 2011 8:19 am
Forum: PHP coding => General
Topic: Generating a SHA1 password result.
Replies: 2
Views: 1036

Re: Generating a SHA1 password result.

:offtopic: LUA????
the forum is about PHP...!!!
by pickyj
Sun Feb 06, 2011 9:28 am
Forum: mySQL & php coding
Topic: How to insert List data in MySQL row?
Replies: 3
Views: 605

Re: How to insert List data in MySQL row?

Code: Select all

<?php
$var1="orange";
$var2="apple";
$var3="whatever";
mysql_query("INSERT INTO ShopBasket ('name','description') VALUES('name123','".$var1.",".$var2.",".$var3."')";
?>
by pickyj
Sun Feb 06, 2011 9:21 am
Forum: PHP General
Topic: Script Pause
Replies: 1
Views: 630

Re: Script Pause

Code: Select all

else {
    echo "Mail Successfully Sent!<br><br>You will be redirected in 5 seconds";
    sleep(5);
    echo "<script language='javascript'>document.write( location.href='".$_POST['URL']."' )</script>";
}
this should work...
by pickyj
Sun Feb 06, 2011 9:18 am
Forum: PHP coding => General
Topic: Save form for sharing?
Replies: 0
Views: 373

Re: Save form for sharing?

MySQL... store the results with an ID (auto-increment) examle row: ID user result +------+----+-------+ |3557 |test |results| +------+----+-------+ and have a php page that will retrieve the row with ID=xxxx something like: <?php $id=$_GET['ID']; $sql=mysql_query("SELECT * FROM testtable WHERE ID='"...
by pickyj
Sun Feb 06, 2011 9:00 am
Forum: PHP coding => General
Topic: Best editor for PHP
Replies: 210
Views: 180294

Re: Best editor for PHP

GEdit... Master of all GUI text editors... 8)
Provides highlighting for nearly all programming languages... :D
Also has plugins that could offer you even auto-copy/paste...
by pickyj
Sat Feb 05, 2011 12:14 pm
Forum: PHP coding => General
Topic: socket server help...
Replies: 0
Views: 364

socket server help...

server.php: <?php include_once("srv.func.inc"); // Begin Configuration // $salt='b#^X-'; $conf=array("host"=>"127.0.0.1", "port"=>4444, "max"=>4); $cm=array('h'=>"help", 'i'=>"info", 'u'=>"chown", 'p'=>"passwd", 'q'=>"exit", 't'=>"tools", 'k'=>"kill", 'p'=>"panel"); $dbconf=array("host"=>"localhost"...