Search found 135 matches

by ghadacr
Wed Aug 08, 2007 7:34 am
Forum: PHP - Code
Topic: Accessing Form Elements
Replies: 13
Views: 920

That is true. PHPSELF is not good, but if the script is only going to be used by your self then it's ok.......
by ghadacr
Wed Aug 08, 2007 7:16 am
Forum: PHP - Code
Topic: Accessing Form Elements
Replies: 13
Views: 920

If you want the form to be submitted to it self, then use

Code: Select all

<form method=\"post\" action=\"<?PHP $_SERVER[PHP_SELF]\ ?>">
by ghadacr
Wed Aug 08, 2007 6:57 am
Forum: PHP - Code
Topic: "$" in a string
Replies: 8
Views: 788

Re: "$" in a string

Code: Select all

$page = "gallery.php";

$var =  '$page';
by ghadacr
Wed Aug 08, 2007 6:51 am
Forum: PHP - Code
Topic: Not redirecting
Replies: 4
Views: 472

Not redirecting

I got a form which has two buttons, lets say if confirmed is pressed then it gets redirected to page 1, if release gets pressed it gets redirected to page 2.... The problem i'm having is that it does not redirect to the appropiate page: Here is the code: <?PHP $Confirm = $_GET['Confirm']; //$Release...
by ghadacr
Fri Aug 03, 2007 9:07 am
Forum: PHP - Code
Topic: FOR each help.....
Replies: 5
Views: 706

thanks for the help guitarlvr, i did the changes. and i 'm just getting the following errors: Notice: Array to string conversion in C:conflight.php on line 30 Notice: Array to string conversion in C:conflight.php on line 32 Notice: Array to string conversion in C:conflight.php on line 34 Notice: Arr...
by ghadacr
Fri Aug 03, 2007 6:59 am
Forum: PHP - Code
Topic: FOR each help.....
Replies: 5
Views: 706

Thansk for the help dream2rule: i have adapted the code as follows: $details = array($title, $firstname, $surname, $ChildAdult, $cost, $notes); foreach ($details as $index => $key) { $query = mssql_init ("sp_insertFlightSpaces"); mssql_bind($query, "@FlightID", $flight, SQLVARCHA...
by ghadacr
Fri Aug 03, 2007 4:42 am
Forum: PHP - Code
Topic: FOR each help.....
Replies: 5
Views: 706

FOR each help.....

The below for each is not working as its not inserting the code into the database, i'm not sure what to do help please... <?PHP include 'opendb.php'; ?> <?PHP include 'header.php'; ?> <?php $title = $_GET['title']; $firstname = $_GET['firstname']; $surname = $_GET['surname']; $ChildAdult = $_GET['Ch...
by ghadacr
Thu Aug 02, 2007 5:06 am
Forum: PHP - Code
Topic: Array confusion....
Replies: 3
Views: 720

I changed it your way: //----Query 5------ $query = mssql_init ("sp_insertFlightSpaces"); $data = array( mssql_bind($query, "@FlightID", $FlightID, SQLVARCHAR)); 'ChildAdult' => array (mssql_bind($query, "@ChildOrAdult", $ChildAdult, SQLVARCHAR)); mssql_bind($query, &qu...
by ghadacr
Thu Aug 02, 2007 3:28 am
Forum: PHP - Code
Topic: Array confusion....
Replies: 3
Views: 720

Array confusion....

I got this array which different names such as title, surname and so on...... echo" <tr> <td><strong>Title:</strong></td> <td><select name=title[]> <option value=></option> <option value=Mr>Mr</option> <option value=Mrs>Mrs</option> <option value=Ms>Ms</option> <option value=Master>Master</opti...
by ghadacr
Tue Jul 31, 2007 11:13 am
Forum: PHP - Code
Topic: Design Suggestions
Replies: 2
Views: 2181

Thanks for the suggestion: This is what i have done so far: what it doess is output the number of form elements based on the number that is entered, but my only problem is it cant tell the difference between the different form elements: Any suggestions??? <?PHP include 'header.php'; ?> <?PHP include...
by ghadacr
Tue Jul 31, 2007 6:39 am
Forum: PHP - Code
Topic: Preventing refresh
Replies: 10
Views: 1555

Nice little article, i think i sorted the problem out last night over a strong coffee...

But thanks for the suggestion do apperciate... I might implement that in future PHP projects.... That model approach.

:)
by ghadacr
Tue Jul 31, 2007 6:16 am
Forum: PHP - Code
Topic: Design Suggestions
Replies: 2
Views: 2181

Design Suggestions

Hey all, I got a design question: I want to design a script that can add details to a database, but the details are all going to be different: For instance the user will enter details such as title, surname ect ect ect.... Once that is done, the user can add another set of details by clicking a butt...
by ghadacr
Mon Jul 30, 2007 6:34 am
Forum: PHP - Code
Topic: Preventing refresh
Replies: 10
Views: 1555

Hmm yeah i get it but, the script i got has mutiple processes running concurrently, so the redirection does sound good, but it wont solve the issue in hand.. Thanks for the suggestion though..
by ghadacr
Mon Jul 30, 2007 5:15 am
Forum: PHP - Code
Topic: Preventing refresh
Replies: 10
Views: 1555

Thanks for the suggestion, but the data that is being passed does not contain email address's... Also i dont want the database to handle too much of the vaildation side of things, i'm running alot of SP's....
by ghadacr
Mon Jul 30, 2007 4:42 am
Forum: PHP - Code
Topic: Preventing refresh
Replies: 10
Views: 1555

miro_igov wrote:How it makes the database annoying?
I tell you how it is annoying, when you got 35 entry's that are actually the same, because some idoit keeps on pressing the refresh button, because they dont think the entry has gone through....