$_POST werkt niet
Het stukje dat niet werkt:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
echo "
<!-- %%%%%%%%%%%%%%%%%
| BASIC DIALOGS
-->
<div id=\"basicdialog\" title=\"".$language['basicsettingsdialog']."\">
<table style='width:100%;'>
<tr>
<td>".$language['itemsearch']."</td>
<td>
<select name='searchbox' id='searchboxchange'>
<option style='text-align:center;'>".$language['itemsearch']."</option>
<option style='text-align:center;'>".$language['itemonheader']."</option>
<option style='text-align:center;'>".$language['itemonmenu']."</option>
<option style='text-align:center;'>".$language['itemoff']."</option>
</select>
</td>
<td>
<a id='opensearchdialog' class='ui-state-default ui-corner-all' href='#' style='text-decoration:none;margin-left:20px;'>".$language['advancedsettings']."</a>
</td>
</tr>
</table>
</div>
<!-- %%%%%%%%%%%%%%%%%
| Search DIALOGS
-->
<div id=\"searchboxdialog\" title=\"".$language['item_searchbox']."\">
<table style='width:100%;'>
<tr>
<td style='text-align:center;'>
<div id=\"searchbox-margin-top\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-margintopamount\" name='margintopsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_top']."' onchange='changewebsite()' />
</td>
<td>
<div id=\"searchbox-margin-bottom\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-marginbottomamount\" name='marginbottomsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_bottom']."' onchange='changewebsite()' />
</td>
<td>
<div id=\"searchbox-margin-left\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-marginleftamount\" name='marginleftsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_left']."' onchange='changewebsite()' />
</td>
<td>
<div id=\"searchbox-margin-right\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-marginrightamount\" name='marginrightsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_right']."' onchange='changewebsite()' />
</td>
<td>
<table><tr>
<td>".$language['webwidth']."</td><td><input type='text' name='searchboxwidth' id='searchboxwidth' value='".$theme_var['item_searchbox_size_width']."' size='4'></td>
</tr><tr>
<td>".$language['headerheight']."</td><td><input type='text' name='searchboxheight' id='searchboxheight' value='".$theme_var['item_searchbox_size_height']."' size='4'></td>
</tr>
</table>
</td>
<td align='right' style='padding-left:20px;'>
<table style='width:100%;'><tr>
<td>".$language['background']."</td>
<td><input type='text' name='backgroundsearchbox' maxlength='6' size='3' id='colorpickerField1' value='".$theme_var['item_searchbox_background_color']."' /></td><td></td>
</tr><tr>
<td>".$language['bordersearchbox']."</td>
<td><input type='text' maxlength='6' size='3' name='borderbackgroundsearchbox' class='borderbackgroundsearchbox' id='colorpickerField1' value='".$theme_var['item_searchbox_border_color']."' /></td><td><input type='text' size='1' name='bordercolorsearchbox' value='".$theme_var['item_searchbox_border_size']."'></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
";
?>
echo "
<!-- %%%%%%%%%%%%%%%%%
| BASIC DIALOGS
-->
<div id=\"basicdialog\" title=\"".$language['basicsettingsdialog']."\">
<table style='width:100%;'>
<tr>
<td>".$language['itemsearch']."</td>
<td>
<select name='searchbox' id='searchboxchange'>
<option style='text-align:center;'>".$language['itemsearch']."</option>
<option style='text-align:center;'>".$language['itemonheader']."</option>
<option style='text-align:center;'>".$language['itemonmenu']."</option>
<option style='text-align:center;'>".$language['itemoff']."</option>
</select>
</td>
<td>
<a id='opensearchdialog' class='ui-state-default ui-corner-all' href='#' style='text-decoration:none;margin-left:20px;'>".$language['advancedsettings']."</a>
</td>
</tr>
</table>
</div>
<!-- %%%%%%%%%%%%%%%%%
| Search DIALOGS
-->
<div id=\"searchboxdialog\" title=\"".$language['item_searchbox']."\">
<table style='width:100%;'>
<tr>
<td style='text-align:center;'>
<div id=\"searchbox-margin-top\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-margintopamount\" name='margintopsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_top']."' onchange='changewebsite()' />
</td>
<td>
<div id=\"searchbox-margin-bottom\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-marginbottomamount\" name='marginbottomsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_bottom']."' onchange='changewebsite()' />
</td>
<td>
<div id=\"searchbox-margin-left\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-marginleftamount\" name='marginleftsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_left']."' onchange='changewebsite()' />
</td>
<td>
<div id=\"searchbox-margin-right\" style='min-height:40px;max-height:40px;float:center;margin:0 auto;'></div>
<p style=\"float:center;margin:0 auto;margin-top:0px;'\">
<input type=\"text\" id=\"searchbox-marginrightamount\" name='marginrightsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_right']."' onchange='changewebsite()' />
</td>
<td>
<table><tr>
<td>".$language['webwidth']."</td><td><input type='text' name='searchboxwidth' id='searchboxwidth' value='".$theme_var['item_searchbox_size_width']."' size='4'></td>
</tr><tr>
<td>".$language['headerheight']."</td><td><input type='text' name='searchboxheight' id='searchboxheight' value='".$theme_var['item_searchbox_size_height']."' size='4'></td>
</tr>
</table>
</td>
<td align='right' style='padding-left:20px;'>
<table style='width:100%;'><tr>
<td>".$language['background']."</td>
<td><input type='text' name='backgroundsearchbox' maxlength='6' size='3' id='colorpickerField1' value='".$theme_var['item_searchbox_background_color']."' /></td><td></td>
</tr><tr>
<td>".$language['bordersearchbox']."</td>
<td><input type='text' maxlength='6' size='3' name='borderbackgroundsearchbox' class='borderbackgroundsearchbox' id='colorpickerField1' value='".$theme_var['item_searchbox_border_color']."' /></td><td><input type='text' size='1' name='bordercolorsearchbox' value='".$theme_var['item_searchbox_border_size']."'></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
";
?>
En de controle lijst:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php //--------------------------------------------------------------------------------------//
// Setting up documents //
//--------------------------------------------------------------------------------------//
$searchbox = $_POST['searchbox']; //Position of searchbox
$searchbox_margin_top = $_POST['margintopsearchbox'];
$searchbox_margin_bottom = $_POST['marginbottomsearchbox'];
$searchbox_margin_left = $_POST['marginleftsearchbox'];
$searchbox_margin_right = $_POST['marginrightsearchbox'];
$sesrchbox_width = $_POST['searchboxwidth'];
$searchbox_height = $_POST['searchboxheight'];
$searchbox_background = $_POST['backgroundsearchbox'];
$searchbox_border_background = $_POST['borderbackgroundsearchbox'];
$basic_site_width_number = $_POST['themewidth'];
$basic_site_width_type = $_POST['sitepxproc'];
$basic_site_background_image = $_POST['background'];
$basic_site_background_color = $_POST['sitebackgroundcolor'];
$basic_site_margin_top = $_POST['thememargin'];
$header_height_min = $_POST['headerheight'];
$header_padding_top = $_POST['paddingtop'];
$header_padding_bottom = $_POST['paddingbottom'];
$header_padding_left = $_POST['paddingleft'];
$header_padding_right = $_POST['paddingright'];
$header_margin_top = $_POST['margintop'];
$header_margin_bottom = $_POST['marginbottom'];
$header_margin_left = $_POST['marginleft'];
$header_margin_right = $_POST['marginright'];
$header_background_image = $_POST['headerimage'];
$footer_height_min = $_POST['footerheight'];
$footer_padding_top = $_POST['footerpaddingtop'];
$footer_padding_bottom = $_POST['footerpaddingbottom'];
$footer_padding_left = $_POST['footerpaddingleft'];
$footer_padding_right = $_POST['footerpaddingright'];
$footer_margin_top = $_POST['footermargintop'];
$footer_margin_bottom = $_POST['footermarginbottom'];
$footer_margin_left = $_POST['footermarginleft'];
$footer_margin_right = $_POST['footermarginright'];
$footer_background_image = $_POST['footerimage'];
$footer_background_color = $_POST['footercolor'];
?>
// Setting up documents //
//--------------------------------------------------------------------------------------//
$searchbox = $_POST['searchbox']; //Position of searchbox
$searchbox_margin_top = $_POST['margintopsearchbox'];
$searchbox_margin_bottom = $_POST['marginbottomsearchbox'];
$searchbox_margin_left = $_POST['marginleftsearchbox'];
$searchbox_margin_right = $_POST['marginrightsearchbox'];
$sesrchbox_width = $_POST['searchboxwidth'];
$searchbox_height = $_POST['searchboxheight'];
$searchbox_background = $_POST['backgroundsearchbox'];
$searchbox_border_background = $_POST['borderbackgroundsearchbox'];
$basic_site_width_number = $_POST['themewidth'];
$basic_site_width_type = $_POST['sitepxproc'];
$basic_site_background_image = $_POST['background'];
$basic_site_background_color = $_POST['sitebackgroundcolor'];
$basic_site_margin_top = $_POST['thememargin'];
$header_height_min = $_POST['headerheight'];
$header_padding_top = $_POST['paddingtop'];
$header_padding_bottom = $_POST['paddingbottom'];
$header_padding_left = $_POST['paddingleft'];
$header_padding_right = $_POST['paddingright'];
$header_margin_top = $_POST['margintop'];
$header_margin_bottom = $_POST['marginbottom'];
$header_margin_left = $_POST['marginleft'];
$header_margin_right = $_POST['marginright'];
$header_background_image = $_POST['headerimage'];
$footer_height_min = $_POST['footerheight'];
$footer_padding_top = $_POST['footerpaddingtop'];
$footer_padding_bottom = $_POST['footerpaddingbottom'];
$footer_padding_left = $_POST['footerpaddingleft'];
$footer_padding_right = $_POST['footerpaddingright'];
$footer_margin_top = $_POST['footermargintop'];
$footer_margin_bottom = $_POST['footermarginbottom'];
$footer_margin_left = $_POST['footermarginleft'];
$footer_margin_right = $_POST['footermarginright'];
$footer_background_image = $_POST['footerimage'];
$footer_background_color = $_POST['footercolor'];
?>
Kan iemand mij helpen?
Gewijzigd op 28/04/2011 21:11:03 door Phpnuke r
2. maak geen overbodige variabelen aan, het heeft geen zin om tig variabelen met dezelfde waarde te hebben waarvan je de herkomst dan niet meer weet te achterhalen
Oh,
1. stel duidelijke vragen
2. post daarbij alleen relevante code (op z'n hoogst zijn dat 20 a 30 regels code)
De tweede stuk code was slechts om te controlleren of alle $_POST values daadwerkelijk verstuurt waren. Alles wat te maken heeft met searchbox helaas niet. Onderaan deze post de errors
2. Just for checking
3. Ik heb een lijst met alle $_POST variables aangemaakt om te kijken of alles werkt. Nu werken alle inputs die te maken hebben met searchbox niet!
4. Sorry, maar als ik stukken weglaat geef ik niet genoeg informatie, dit is letterlijk de script wat gewoon bam poef niet werkt en ik kan niet vinden wat er fout is.
Hieronder de errors (met nadruk op de naam, alleen de searchboxes werken niet en de rest wel)
Quote:
Notice: Undefined index: searchboxx in C:\wamp\www\doveral\sources\admin\savetheme.php on line 19
Notice: Undefined index: searchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 20
Notice: Undefined index: margintopsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 21
Notice: Undefined index: marginbottomsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 22
Notice: Undefined index: marginleftsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 23
Notice: Undefined index: marginrightsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 24
Notice: Undefined index: searchboxwidth in C:\wamp\www\doveral\sources\admin\savetheme.php on line 25
Notice: Undefined index: searchboxheight in C:\wamp\www\doveral\sources\admin\savetheme.php on line 26
Notice: Undefined index: backgroundsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 27
Notice: Undefined index: borderbackgroundsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 28
Notice: Undefined variable: settings in C:\wamp\www\doveral\sources\admin\savetheme.php on line 62
Notice: Undefined variable: settings in C:\wamp\www\doveral\sources\admin\savetheme.php on line 62
Notice: Undefined index: searchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 20
Notice: Undefined index: margintopsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 21
Notice: Undefined index: marginbottomsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 22
Notice: Undefined index: marginleftsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 23
Notice: Undefined index: marginrightsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 24
Notice: Undefined index: searchboxwidth in C:\wamp\www\doveral\sources\admin\savetheme.php on line 25
Notice: Undefined index: searchboxheight in C:\wamp\www\doveral\sources\admin\savetheme.php on line 26
Notice: Undefined index: backgroundsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 27
Notice: Undefined index: borderbackgroundsearchbox in C:\wamp\www\doveral\sources\admin\savetheme.php on line 28
Notice: Undefined variable: settings in C:\wamp\www\doveral\sources\admin\savetheme.php on line 62
Notice: Undefined variable: settings in C:\wamp\www\doveral\sources\admin\savetheme.php on line 62
Gewijzigd op 28/04/2011 21:24:19 door phpnuke r
<form action="" method="post" >
</form>
ik vind het vreemd dat de rest wél werkt?
Gewijzigd op 28/04/2011 21:31:33 door Jason van der Zeeuw
Ik zie wel selectboxen en input velden maar geen form tags
1. name zit niet in het form
2. name wel aanwezig maar type is nu eenmaal zo dat het wel dan niet mee verstuurd wordt
En is het dan niet handiger om naar een var_dump / print_r te kijken van $_POST dan je zo uit te sloven al die $_POST zo te definieren.
Quote:
1. name zit niet in het form
2. name wel aanwezig maar type is nu eenmaal zo dat het wel dan niet mee verstuurd wordt
2. name wel aanwezig maar type is nu eenmaal zo dat het wel dan niet mee verstuurd wordt
<input type=\"text\" id=\"searchbox-margintopamount\" name='margintopsearchbox' style='width:23px;float:center;margin:0 auto;margin-top:10px;' value='".$theme_var['item_searchbox_margin_top']."' onchange='changewebsite()' />
Is bijvoorbeeld een input di niet werkt. De output ervan is(broncode):
<input type="text" id="footermargintopamount" name='footermargintop' style='width:23px;float:center;margin:0 auto;' value='0' onchange='changewebsite()' />
Klopt maar ik wil zoiezo alle $_POST values even op een rijde hebben staan in de scripts...
Gewijzigd op 28/04/2011 21:43:49 door phpnuke r
Kom nu eens met relevante informatie, je komt nu weer met voorbeelden aankakken welke niet te controleren zijn
Naja ik denk dat ik voor optie 2 ga, het is gewoon onvindbaar.