Jump to content

DeFActo

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DeFActo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. http://ca.php.net/manual/en/function.substr.php yep, that is one of the options. thanks again.
  2. that is why i try to use js as less as possible. oh well, i will try to figure it out some other way. cheers.
  3. Thanks AndyB, but i would like to avoid JAVA scripting.
  4. Hello, Is there a possbility to make a multi line text area with fixed count of characters that can be inputed there?
  5. <?php require_once("config.php"); $db=mysql_connect($AddressBook_HOST,$AddressBook_Username,$AddressBook_Password); mysql_select_db($AddressBook_DatabaseName,$db); $query = "SELECT HouseNumber FROM Addresses ORDER BY HouseNumber"; $result = @mysql_query($query); print "<p><select></p>"; if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result)) { $HouseNumber = $row[HouseNumber]; print '<p><option value="'.$HouseNumber.'">'.$HouseNumber.'</option></p>'; } print "<p></select></p>"; } ?> what about now? found some mistake, sorry, try now.
  6. check this out http://www.phpfreaks.com/forums/index.php/topic,195463.0.html
  7. print '<p><option value="'$HouseNumber'">'$HouseNumber'</option></p>'; try that.
  8. <?php if (isset ($_POST['submit'])) { $con = mysql_connect("localhost","my_db","password"); //these are correct login details table is called Members if (!$con) { die('Contact support@fonecave.co.uk - Could not connect: ' . mysql_error()); } mysql_select_db("fonecave_00001", $con); mysql_query("INSERT INTO members (name, email, password) VALUES ('$_POST[name]', '$_POST[address]', '$_POST[password]')"); echo "Registration Complete!"; } ?> what about now?
  9. try this <?php if (isset ($_POST['submit'])) { $con = mysql_connect("localhost","my_db","password"); //these are correct login details table is called Members if (!$con) { die('Contact support@fonecave.co.uk - Could not connect: ' . mysql_error()); } mysql_select_db("fonecave_00001", $con); mysql_query("INSERT INTO members (name, email, password) VALUES ('$_POST[name]', '$_POST[address]', '$_POST[password]')"); echo "Registration Complete!"; ?>
  10. Hello, I'm trying to make list menu that gets values from database. Here is my code <form style="margin-left:300px" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <select name="name" onChange="this.form.submit()"> <option >----------</option> <?php $hostname="localhost"; $mysql_login=" "; $mysql_password=" "; $database="menu"; if (!($db = mysql_pconnect($hostname, $mysql_login , $mysql_password))){ die("Can't connect to database server."); }else{ if (!(mysql_select_db("$database",$db))){ die("Can't connect to database."); } } $result = mysql_query( "SELECT id FROM pavadinimai" ); while ($get_info = mysql_fetch_row($result)){ print '<option value="<?php foreach ($get_info as $field) ?>>"<?php echo "$field";?></option>'; } ?> </select> </form> but i get as much empty fields instead of values as are records in database table. Could anyone help me, please?
  11. header('Location: DB/control/insert.php'); changed to include.
  12. i am loosing POST array from header('Location: DB/control/insert.php'); anybody could help me how to fix it?
  13. INSERT INTO klientai (vardas, pavarde, adresas, miestas, pastas, el_pastas) VALUES ('','','','','','') Warning: Cannot modify header information - headers already sent by (output started at /home/sbinternational/public_html/failai/DB/control/insert.php:9) in /home/sbinternational/public_html/failai/DB/control/insert.php on line 14 Everything was just fine before i have decided to make checking for empty inputs and wrong email address.
×
×
  • 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.