kevonini
Members-
Posts
24 -
Joined
-
Last visited
Never
Everything posted by kevonini
-
Need some direction to the right resource for this. Have a scheduling app done with php and mysql and want an email to be sent each time a user sets up an appointment. The site will be live so will just using the mail() function in php be enough?
-
It's ok..I edited the php.ini file and I am ok.
-
My sessions were not working when I put them live recently. I used the ini_set("display_errors", "1"); error_reporting(-1); code to find out the error and was given this "Notice: A session had already been started - ignoring session_start()" Since the hosting company seems to autoload sessions...how do I go about setting my session variables now as they are not being passed through the site?
-
Can anyone recommend a good open-source chat script that can be easily integrated into a site?
-
The assignment is a PHP assignment to do a site. I have done my php pages and connected to a mySQL database to get login information and store data retrieved from forms on the site. How would I give the teacher the pages along with the database so that she can access everything?
-
I have an assignment done in php with a MySQL backend, how would I make the MySQL database accessible to my lecturer as I need to submit the assignment on a CD.
-
Thanks ..that did the trick
-
inside the text file the data is being shown beside each other
-
That seemed to be it but now the newline feature is not working...would I need to modify something in the .ini file fwrite($handle, $name."\n");
-
It's been a while since I've dealt with text files and currently I am unable to write the contents of a variable to a text file, only the literal is being written. Should I be de-referencing or is this even possible? Also the problem is compounded by the fact that i also want to write the contents of a class display function into the text file.
-
I must confess...I made a REAL newbie error that wasn't PHP related at all - my form was missing the POST method so that section of code received nothing
-
Will certainly look into it... a quick question though - how wud i copy the database i am working with to make other people have access to it, where is it stored?(stupid i know but i'm really flustered now)
-
Think i'm going to call this one a loss and change the requirements for the query... this is a small issue and it's taking up too much time....Thanks much for all the assistance....I learnt quite a lot!
-
I did that already that's how I know it's still the sql syntax.
-
Warnings figured out and after the abstraction it comes back to the same issue....something wrong with the syntax of my query...
-
figured out the last two warnings...but the first one is still an issue and the insert still did not work.
-
A few issues....not sure what parameters to use now for the mysqli_query - normally i use the ($link, $query) now it is picking up the link as null...also not sure what to use for mysqli_insert_id...thought it wud be the link but that is showing as null as well. A number of warnings for the escape sequence part as well. Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\confirm_appointment.php on line 57 Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\confirm_appointment.php on line 82 Warning: mysqli_insert_id() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\confirm_appointment.php on line 83
-
I am a newbie and your abstraction has me more confused than before.
-
It seems u r right.. $totalcost is known until it reaches that section of the code. Going to try to pull it from the database inside the statement block.
-
There is a value for $totalcost
-
Got this error message - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''','','','','','')' at line 1 This would mean that empty strings are being passed to the database... but the values for these can be null so what am i missing?
-
what wud be the mysqli value to send to the mysqli_error function?
-
Not seeing how string parsing is applicable.......The data is not being sent to the database and the column names are correct and the data types are compatible....
-
<?php error_reporting(E_ALL^E_NOTICE); $connect = mysqli_connect("");//removed $doc = $_GET["doctor"]; $username = $_GET["username"]; $sql = "SELECT fname, lname from newpatient where username = '$username'"; $result = mysqli_query($connect, $sql); $value = mysqli_fetch_row($result); $fname = $value[0]; $lname = $value[1]; $totalcost = $_GET["totalcost"]; $reason1 = $_GET["reason1"]; $reason2 = $_GET["reason2"]; $reason3 = $_GET["reason3"]; $reason4 = $_GET["reason4"]; $reason5 = $_GET["reason5"]; $reason6 = $_GET["reason6"]; $reason7 = $_GET["reason7"]; $reason8 = $_GET["reason8"]; $date = $_GET["date"]; $reasons = array($reason1,$reason2,$reason3,$reason4,$reason5,$reason6,$reason7,$reason8); rsort($reasons); $reason1 = $reasons[0]; $reason2 = $reasons[1]; $reason3 = $reasons[2]; $reason4 = $reasons[3]; if(isset($_REQUEST["yes"])) { $sql1 = "SELECT * FROM appointments where doctor_name = '$doc' and time = '$time'"; $result1 = mysqli_query($connect, $sql1); $num_rows = mysqli_num_rows($result1); if($num_rows > 0) { echo "Appointment Time already chosen. Select another time."; echo "<script language = 'javascript'>document.location.href='make_appointment.php?doc=$doc&username=$username'</script>"; } else { $sql2 = "INSERT INTO appointments (username, time, doctor_name, cost, reason1_for_visit, reason2_for_visit,reason3_for_visit,reason4_for_visit, fname, lname) values ('$username','$date','$doc',$totalcost,'$reason1','$reason2','$reason3','$reason4','$fname','$lname')"; $result2 = mysqli_query($connect, $sql2); if($result2) echo "This worked."; else echo "Insert did not work."; //echo "<script language = 'javascript'>document.location.href='registered_login_page.php?username=$username'</script>"; } } mysqli_close($connect); ?>