Jump to content

Weiss

Members
  • Posts

    52
  • Joined

  • Last visited

Posts posted by Weiss

  1. echo '<td><form action="findorder.php?'. $order_num.'"><input type="submit"  value="edit" /></form></td>';

    doesnt seep to work... above is the line that create the edit button, (order_num is uniqe in the database), but when pressed, it send the user to the findorder.php? with no order_num.. what am i doing wrong here?

  2. Hi!

    Im making a php script which goes over an MySQL DB and present the Db as Table (its actually a db of customers where there's info of their ship address, phone, etc).

    so the php script fetch array and take 1 row at a time, and ofcours go thru all the elements in the DB and present it in a table.

    I wish i can make an EDIT button at the end of each row where the user can press it and it will move it to another (already made) edit user php script with the row Customer number. 

    of cours i can end each line with a button but how can i make it so that after all the table has been printed out (maybe 250 rows) each button at the end of the row will lead to the edituser.php with the specific row customer number?

    any idea? thanks in advance

  3. Thanks! so correct me if im wrong, by reading your comment, its best to keep the data in database as deafult  yyyy-mm-dd so i can have calculations. if my customer want to see it in dd-mm-yyyy i can retreive the data and manipulate it while echoing in the php code? is that what i should do?

  4. Hi. i have a table with a date row. i have 2 problems with it. first, it saves the date as mm-dd-yyyy and i actually need it to save it as dd-mm-yyyy.

    the second problem is more of a question.. after a date has been saved, can i use it to calculate? can i calculate and output this date + day for example?

    thanks in advance

  5. Hi all.

    Soo.. im creating this form where one of the fields the user have to select his city.. i want him to select from a list with all the cities in our country, of cours we hace more than 1.5k cities.. i imagine theres a better way to handle this other than go city after city inside <option>.. right? Thanks in advance

  6. thanks for your help. though im still lost :(

    my DB and table are set to be utf8_general_ci.

    my php script start with these lines:

    <?php

    $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
    mysqli_select_db("logitech",$dbc); //logitech is the name of the DB.
    mysqli_query("SET character_set_client=utf8");
    mysqli_query("SET character_set_connection=utf8");
    mysqli_query("SET character_set_databse=utf8");
    mysqli_query("SET character_set_results=utf8");
    mysqli_query("SET character_set_server=utf8");

    ...

    still when i run a select query, whenever i select colums with numbers/english letters it works, when i try to retrieve info from coloum included hebrew it write lots of "?????"

    any idea?

  7. Hey. Im not quite sure if the question should be here or in php topic. 

    I have SQL database with some coloums in hebrew. its set to hebrew_bin (refering to the collation coloum in the structure of the DB).

    well, its shoes up fine when i look at it thru phpmyadmin but when i write a php script to retrieve the data i get lots of "???????".

    i must be doing something wrong here!, please help

    thanks very much helpers!

  8. Hello, A noob in a need of help here!

    my question is about using sql with php, right now im doing it on localhost so its no problem,BUT, when i move my site to be a real site, the php file has a line that connect to the sql database using the database name, my username and password. so my question here is- isnt it dangerous to have a php file on the server like this? i mean, cant someone save the php file and look into it and see the password?

    thanks in advance

  9. Hi everyone. I am running MAMP, when im logging from my computer to the localhost everything works great. when i try to log in from other computers to my IP address, it wont log in. i have disabled Firewall, did the port forwarding thingy,  but still no bueno... am i missing something here?

    thanx in advance :D

  10. First- thank you very much for the help!. this is the code now:

    <?php
    //Step1
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

     $db = mysqli_connect('localhost','root','arr4shed','aliens_abduction', 3306)
     or die('Error connecting to MySQL server.');
    ?>

    <html>
     <head>
     </head>
     <body>
     <h1>PHP connect to MySQL</h1>
     
    <?php
    //Step2
    $query = "SELECT * FROM table_name";
    mysqli_query($db, $query) or die('Error querying database.');
    ?>

    </body>
    </html>

     

    this is the result in the browser:

    PHP connect to MySQL

    Error querying database.

     

    any idea?

  11. I am lost! please help:

    Hello all, i'm new to this, i would appriciate someone helping me access my sql with php on localhost. ive installed MAMP, i have created databases in my sql. now im trying to reach it thru the php code:

    <?php
    //Step1
     $db = mysqli_connect('localhost','root','1234','learnning_over_here')
     or die('Error connecting to MySQL server.');
    ?>
    
    <html>
     <head>
     </head>
     <body>
     <h1>PHP connect to MySQL</h1>
     
    <?php
    //Step2
    $query = "SELECT * FROM table_name";
    mysqli_query($db, $query) or die('Error querying database.');
    ?>
    
    </body>
    </html>

    i have no idea why but it just woldnt connect. ive been trying all day but.. not working. what am i doing wrong?

  12. Hello all.

    I'm very new to this sql thingy. ive installed apache 2.4 and mysql 5.6.

    the installation seems to work good, i see that its online on localhost.

    so i get this black window thingy where i can type the commands

    (mysql-sql>)

    well... then i try to create a new database:

    create database blabla;

    but i get: ERROR: Not connected.

    what am i doing wrong here?

     

  13. Hello everyone.

    Im pretty new at this, but ive built an html form that send to php to proccess it and the php is supposed to send email.

    Im currently running windows 10, apache 24 with php and mysql installed, the "site" sits on my computer of cours and im using localhost to enter it.

    when i run the script i get the following msg:

    Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Apache24\htdocs\report.php on line 30
    Thanks for submitting the form.

    I understand that i need to edit my php ini, but frankly i have no idea what im supposed to write there?

    thank you in advance for helping and please, if you can explain it to me as if i entered this world only a month ago :o

    thanks very much

×
×
  • Create New...