Jump to content

westminster

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

westminster's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi thanks bradcis, yeah i figured out the problem already. thanks for replying anyways.
  2. Hi, i see that you used php and odbc on pc. i have also done the same configuration and created a file called 'odbc.php' were my connection to the database was established. but can you tell me the code to write in the code of the webpages that contain forms to insert data in to the database???
  3. hi, thanks for you help. i added the php tags but now it comes up with the following error Parse error: syntax error, unexpected ';', expecting ')' in C:\wamp\www\Westminster_Studentville\NewMember.php on line 24 what should i do? and you mentioned my code is appearing the way it should.can u tell me how it is supposed to appear??? by the by when you say westminster coll in pa, do you mean pa as in pennsylvania, usa? if so, no it's actually westminster university, london.
  4. hi anyone, im new to php however i am creating an application that uses php to connect to a ms access database via ODBC i have configured it together according to the instruction i read. i created a file called 'odbc.php' which contains the details. however i read that to link individual webpages to insert/update data in the database i have to write a php code for it in the page i want connected. Can anyone pls tell me what the code i need to put in is and where in the document page should i place the code? Also could you have a look at my odbc.php code to tell me if it's written correctly? $odbc = odbc_connect ('project', '', '') or die('Could Not Connect to ODBC Database!'); ?> <? if(!function_exists('')) { function odbc_fetch_array($result, $rownumber=-1) { if (PHP_VERSION > "4.1") { if ($rownumber < 0) { odbc_fetch_into($result, $rs); } else { odbc_fetch_into($result, $rs, $rownumber); } } else { odbc_fetch_into($result, $rownumber, $rs); } $rs_assoc = Array(); foreach ($rs as $key => $value) { $rs_assoc[odbc_field_name($result, $key+1)] = $value; } return $rs_assoc; } } ?> Pls help. i'll appreciate even the smallest help.
  5. Hi someone ple help me im new to php One problem i've got is that i created a form and added an error form called 'NewMember.php' such that if the user submits the form without filling it should send an error message telling them the part of the form that has been left blank. However, it doesnt like this, on cliking the submit button the page displays the whole php code. can someone tell me whats wrong, this's my code: --> </style> </head> $required = array("FirstName" => "First Name", "LastName" => "Last Name", "Email" => "Email Address", "Password" => "Password", "SecurityQuestion" => "Security Question"; foreach($required as $field => $label) { if (!$_POST[$field]) { $err ,= "Please fill in your $label" <br>"; } } </body> </html> on clicking the submit button this is what i get shown on the page below: $required = array("FirstName" => "First Name", "LastName" => "Last Name", "Email" => "Email Address", "Password" => "Password", "SecurityQuestion" => "Security Question"; foreach($required as $field => $label) { if (!$_POST[$field]) { $err ,= "Please fill in your $label" "; } } PLS HELP! WHATS WRONG?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.