Search found 38 matches

by wadesmart
Mon Jan 24, 2005 1:32 pm
Forum: PHP - Code
Topic: Passing an array in a hidden variable
Replies: 7
Views: 317

Ok. I got something.

I have been using echo to output the html but that isnt how I usually do it.
I normally do a $form_block and add things in as i need them. That was the problem.

I think I got it now.

Wade
by wadesmart
Mon Jan 24, 2005 1:21 pm
Forum: PHP - Code
Topic: Passing an array in a hidden variable
Replies: 7
Views: 317

No. Im working on a script on my computer. Here is the actual code though and then a copy of the information from my screen. page <?php if(isset($_POST&#1111;'Array'])) &#123; echo "<pre>"; print_r($_POST); $var_value = $_POST&#1111;'Smart_Family']; echo "Unserializing.......
by wadesmart
Mon Jan 24, 2005 1:00 pm
Forum: PHP - Code
Topic: Passing an array in a hidden variable
Replies: 7
Views: 317

01242005 1258 GMT-6 I didnt make it clear what the problem was. My fault. I am sending the data just find but when it unserialize() the data is incorrect. Before: a:4:{i:0;s:4:"Wade";i:1;s:5:"Kathy";i:2;s:8:"Chandler";i:3;s:5:"Smart";} After: a:2:{i:0;s:4: I d...
by wadesmart
Mon Jan 24, 2005 12:41 pm
Forum: PHP - Code
Topic: Passing an array in a hidden variable
Replies: 7
Views: 317

Passing an array in a hidden variable

01242005 1242 GMT-6 I am passing an array onto another page but I have ran into some problems. $array = $array(); $array[] = "one"; $array[] = "two"; $array[] = "three"; $var_serial = seralize($array); $var_value = rawurlencode($var_serial); input type='text" name=...
by wadesmart
Sat Dec 04, 2004 2:33 pm
Forum: PHP - Code
Topic: Reposting form information
Replies: 1
Views: 191

Reposting form information

I have these fields Im testing for values. If they are not present then I show the field to insert the value but, if they are present I post what was put in. When the missing information is put in though, I want to resubmit all the information again. How can you do this? I thought the hidden field w...
by wadesmart
Thu Dec 02, 2004 2:48 pm
Forum: PHP - Code
Topic: Help with Array and variables
Replies: 2
Views: 359

Tried this... <?php <html><head></head> <body> <p>In Math the graders were in order:<br /></p> <?php var_dump($_POST); echo '<pre>'; print_r($_POST); while(list($_POST['Index'],$_POST['Value'])=each($_POST['Math'])) { $GradeStudent[] = $_POST['Math'].$_POST['Index'] . $_POST['Student'].$_POST['Index...
by wadesmart
Thu Dec 02, 2004 1:30 pm
Forum: PHP - Code
Topic: Help with Array and variables
Replies: 2
Views: 359

Help with Array and variables

Im have been working on understanding arrays but getting the information back out is difficult. Here is a tutorial I have been working one. Page One: <?php <html><head></head> <body> <?php echo"<form method='post' action='exam2.php'>"; $Student = array("Albert Einstein", "Iv...
by wadesmart
Tue Nov 30, 2004 2:13 pm
Forum: PHP - Code
Topic: order of output to a screen
Replies: 3
Views: 206

order of output to a screen

11302004 1407 GMT-6 I have this long script. Inside a for loop Im checking to see if any of the form fields are empty. If they are then I want post the information back to the screen so they can fill in the missing information. If none of the fields is missing any information, I want to change a lot...
by wadesmart
Mon Nov 29, 2004 2:37 pm
Forum: PHP - Code
Topic: [SOLVED] For() Loops with If Statemements
Replies: 40
Views: 3808

What Im wanting to do is for each loop check a whole group of similar account names.

When I echo accounts i can see all the data that way but not on the web page.
by wadesmart
Mon Nov 29, 2004 12:32 pm
Forum: PHP - Code
Topic: [SOLVED] For() Loops with If Statemements
Replies: 40
Views: 3808

Ok. Im getting back to my project and applying everything that I have learned, <?php if(isset($_POST['accounts'])) { // set title $title = "Missing Form Information"; $form_block = ' <h3>Account Information Missing</h3> <form method="post" action='.$_SERVER['PHP_SELF'].'> '; var_...
by wadesmart
Sat Nov 27, 2004 3:27 pm
Forum: PHP - Code
Topic: [SOLVED] For() Loops with If Statemements
Replies: 40
Views: 3808

Im using SciTE Version 1.61 and I also use NoteTab Lite. I can see two windows side by side to work on the same document to make changes.

Ill play with it some more
by wadesmart
Sat Nov 27, 2004 2:32 pm
Forum: PHP - Code
Topic: [SOLVED] For() Loops with If Statemements
Replies: 40
Views: 3808

Ok. I changed the final block to this: <?php if(isset($_POST['submit2'])){ //var_dump($_POST); //echo '<pre>'; //print_r($_POST); $form_block = ' '; for($i=0; $i< $_POST['number']; $i++) { echo ' <fieldset> <p>Car '.$i.' is a '.$_POST['name-'.$i].' and has a '.$_POST['engine-'.$i].' engine with '.$_...
by wadesmart
Sat Nov 27, 2004 2:26 pm
Forum: PHP - Code
Topic: [SOLVED] For() Loops with If Statemements
Replies: 40
Views: 3808

Ok. I changed all the input name = value to input name=value. I dont understand though what you mean about the $form_block. I thought if you have a single script that you need to break into parts, you sue $form_block = ' at the beginning and then with the parts you use $form_block .= ' . If you use ...
by wadesmart
Sat Nov 27, 2004 1:01 pm
Forum: PHP - Code
Topic: [SOLVED] For() Loops with If Statemements
Replies: 40
Views: 3808

Ok. Worked on this more after some sleep and got it to work with this: <?php <?php if(isset($_POST['submit3'])){ for($i=0; $i< $_POST['number']; $i++) { $form_block = ' <fieldset> <p>Car '.$i.' is a '.$_POST['name-'.$i].' and has a '.$_POST['engine-'.$i].' engine with '.$_POST['doors-'.$i].' doors.<...
by wadesmart
Fri Nov 26, 2004 6:59 pm
Forum: PHP - Code
Topic: [SOLVED] For() Loops with If Statemements
Replies: 40
Views: 3808

Ok. I give up. It will put out the first page only and when you hit submit, it just falls through the if blocks and reposts the first page.