conflict ghilimene.. asa cred
Discutii despre script-uri si coduri PHP-MySQL, precum si lucru cu XML in PHP.
-
Wayn3
- Mesaje:111
conflict ghilimene.. asa cred
am si eu eroarea asta in aceasta linie
Cod: Selectaţi tot
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in...
... ce ar putea cauza conflictul ?
Cod: Selectaţi tot
<select class="hide" id="n1" name="liga" value="'.$_SESSION['liga'].'">
formularul e intr-un cod php iar "echo" am deschis cu
am incercat multe combinatii dar nu am reusit ... am ajuns la concluzia ca este de la
ce as putea sa-i fac ?
trif
Mesaje:500
ai facut asa:
Cod: Selectaţi tot
<select class="hide" id="n1" name="liga" value="'.$_SESSION[liga].'">
. cred ca asta este, nu sunt sigur. cu stima trif
M-am hotarat!
De ce sa fiu trist?
Oricum nu intereseaza pe nimeni...!
Mai bine sunt fericit si ii enervez pe toti cu fericirea mea!
http://www.cantaricrestine.ro
---> cu stima Trif
Wayn3
Mesaje:111
pai care e problema ? care e buba?
MarPlo
Mesaje:4343
Problema nu pare de la acea linie de cod, acolo ghilimelele sunt puse corect. Probabil la linii de cod mai sus, de exemplu un caracter punct-si-virgula ( ; ) de sfarsit ne adaugat, sau sirul cu acel "echo" nu e inchis corect.
Wayn3
Mesaje:111
uite asta e tot scriptul de dinaintea liniei , inclusiv linia cu eroarea :
Cod: Selectaţi tot
echo '
<form action=\'/index.php?page=c2&p=adauga_pronostic2&add=1\' name="form" method=\'post\' onsubmit="adProdus();">
<table>
<tr><td align=left valign=middle>Data eveniment : </td>
<td align=left>
<select name=zi value="'.$_SESSION['zi'].'">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
<option value=8>8</option>
<option value=9>9</option>
<option value=10>10</option>
<option value=11>11</option>
<option value=12>12</option>
<option value=13>13</option>
<option value=14>14</option>
<option value=15>15</option>
<option value=16>16</option>
<option value=17>17</option>
<option value=18>18</option>
<option value=19>19</option>
<option value=20>20</option>
<option value=21>21</option>
<option value=22>22</option>
<option value=23>23</option>
<option value=24>24</option>
<option value=25>25</option>
<option value=26>26</option>
<option value=27>27</option>
<option value=28>28</option>
<option value=29>29</option>
<option value=30>30</option>
<option value=31>31</option></select>-
<select name=luna value="'.$_SESSION['luna'].'">
<option value=1>Ian</option>
<option value=2>Feb</option>
<option value=3>Mar</option>
<option value=4>Apr</option>
<option value=5>Mai</option>
<option value=6>Iun</option>
<option value=7>Iul</option>
<option value=8>Aug</option>
<option value=9>Sept</option>
<option value=10>Oct</option>
<option value=11>Nov</option>
<option value=12>Dec</option></select>-
<select name=an value="'.$_SESSION['an'].'">
<option value=2011>2011</option>
<option value=2012>2012</option>
<option value=2013>2013</option>
<option value=2014>2014</option>
<option value=2015>2015</option>
<option value=2016>2016</option>
<option value=2017>2017</option>
<option value=2018>2018</option>
<option value=2019>2019</option>
<option value=2020>2020</option></select></td></tr>
<tr><td align=left valign=middle>Sport : </td>
<td align=left> <select name=sport value="'.$_SESSION['sport'].'">
<option value=''>-</option>
<option value=1 onclick="getSel(\'n1\')">Auto-Moto</option>
<option value=2 onclick="getSel(\'n2\')">Baschet</option>
<option value=3 onclick="getSel(\'n3\')">Box si AMM</option>
<option value=4 onclick="getSel(\'n4\')">Fotbal</option>
<option value=5 onclick="getSel(\'n5\')">Handbal</option>
<option value=6 onclick="getSel(\'n6\')">Hochei</option>
<option value=7 onclick="getSel(\'n7\')">Rugby</option>
<option value=8 onclick="getSel(\'n8\')">Tenis</option>
<option value=9 onclick="getSel(\'n9\')">Volei</option>
</select>
<select class="hide" id="n1" name="liga" value="'.$_SESSION['liga'].'">
MarPlo
Mesaje:4343
La sfarsit lipseste ghilimea simpla de inchidere a sirului ( ' ) si caracterul ( ; ) .
Wayn3
Mesaje:111
ma tem ca nu-i asta... asta e doar o parte din cod .. iar '; este pusa la sfarsit
MarPlo
Mesaje:4343
Se poate sterge treptat bucati din sir sau instructiuni complete, pana nu mai apare eroarea si asa se poate depista unde era cauza.
Sau, se poate testa separat acel "echo", intr-un fisier php de test, si daca functioneaza e clar ca problema e in alta parte.
MarPlo
Mesaje:4343
La linia 68 e value='' , ghilimele simple in "echo" cu acelasi tip de ghilimele, ar trebui ( value="" ).
Wayn3
Mesaje:111
gata am rezolvat...aveai dreptate , aceea era problema
multumesc