Jump to content

Weiss

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by Weiss

  1. when i try doing this: echo '<td><form method="get" action="findorder.php"><input type="submit" name="testing" value="Edit" /></form></td>'; i get redirected to: http://localhost/logitech/findorder.php?testing=Edit .. i can use $_GET['testing'] but it will give me whaever in the value which is "Edit".. i cannot change the value because it will change the writing on the button
  2. 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?
  3. 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
  4. Weiss

    Working with dates

    You sir, are the best. thank you!
  5. Weiss

    Working with dates

    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?
  6. Weiss

    Working with dates

    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
  7. Back to the topic, as mentioned i need to make a select list with 1.5k cities. Is there a quick way to do that?
  8. I actually dont live in the U.S.. in here we just have country name and then city name
  9. 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
  10. Weiss

    sql with hebrew

    solved it! thanks very much again!
  11. Weiss

    sql with hebrew

    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?
  12. Weiss

    sql with hebrew

    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!
  13. Weiss

    Noob question (Sorry!)

    Ah so the php file is safe within the hosting server! thanks!
  14. 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
  15. Weiss

    Localhost

    btw i dont mean from the same netweork.. i mean like i wanna show the site im working on to my friend who is far away..
  16. Weiss

    Localhost

    i google "whats my ip4v aderss" so i get the actual ip adress
  17. Weiss

    Localhost

    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
  18. Weiss

    Please help a newbie

    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?
  19. Weiss

    creating database

    well ive installed MAMP and im now using phpmyadmin so now its working
  20. Weiss

    Please help a newbie

    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?
  21. Weiss

    creating database

    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?
  22. Weiss

    Sending mail

    the testmailtool work great thanks very much
  23. Weiss

    Sending mail

    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 30Thanks 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 thanks very much
  24. Ah i see, first of all thank you very much for your answer. So from what youre saying it doesnt sound like a simple issue to solve, i guess ill pass that for now, thanx very much again.
×
×
  • Create New...