![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
fugix
-
Posts
1,483 -
Joined
-
Last visited
Posts posted by fugix
-
-
looks to me like you accidently placed single quotes where backticks are needed...try this
$result4 = mysql_query("SELECT `lastlogin` from `databasename`.`tablename` WHERE `tablename`.`username` = '$myusername'");
-
insert the necessary code into your file
-
write your query as such
$sql = "SELECT * FROM tbl_pages WHERE tbl_pages.pageCategoryId = '$selectedPage' AND active = '1' LIMIT 1"; $result = mysql_query($sql) or die ("Error in page sql query:". $sql);
-
Genius
I follow!
So what i should be doing is set it to 0 for example then update it to 1
Genius! will try it out.
I've finished work now..gotta beat the traffic.
If your online tonight or tommorow I let u kno how I get on.
Thanks buddy u've been a revelation.
speak 2 u soon
no problem at all, if you have any further questions dont hesitate to ask
-
the query that i provided above should be what you are looking for...whatever query you are using to output the names of the people that customers can book is the table that you will want to add this to. I believe that its this one
$getquery=mysql_query("SELECT * FROM book_appointment WHERE c_id='$check_id' and booked='0'");
now, you will set the default value of that field to 0, meaning that they are not booked yet. Then when a customer books one of the people, you will have an update query similar to this
$getquery=mysql_query("update book_appointment set booked='1' WHERE persons_id='id'");
now granted i dont know what your fields are called, that is just an example...any further questions let me know
-
you know what you could do, you could add another field called "booked" or something like that, and when a customer books a client, the value of that field you could make be 1, or yes using an update query...and set the default value to 0, or no. then you can set your display query to this
$getquery=mysql_query("SELECT * FROM book_appointment WHERE c_id='$check_id' and booked='0'");
this would make it so it will only show people that arent booked...make sense?
-
can you show me the code where the data is displayed please
-
sounds like you could incorporate a simple if,else statement to check if the customer is booked or not..can you show us any code that you have done thus far
-
And you don't receive any errors from this script? Also, what is your error_reporting level set to?
-
$classes = array('0' => "Azure Knight", '1' => "Segita Hunter", '2' => "Incar Magician", '3' => "Vicious Summoner", '4' => "Segnale", '5' => "Bagi Warrior"); Foreach($classes as $k=>$v). { Echo "<img src='{$v}.jpg' />"; } however the space in the names might cause a problem. I would advise adding an underscore or some connecting character instead
-
-
how are the links being generated?
-
When asking to mark the thread as solved, take note of whether the person is new (possibly go look to see if they've marked any others as solved) then point them in the right direction. Asking them to click the "TOPIC SOLVED" button, which is below the posts, on the left of the screen, above the Quick Reply box, ain't too difficult now is it?
Also, don't forget to tell them that they'll get jelly beans when they mark a thread as solved.
lol...was just a thought that i wanted to throw out there
-
i would utilize the full space given and increase the size of the text...looks pretty small and hard to read on chrome
-
honestly the second part does not make sense to me...but it sounds to me like you might want to implement AJAX into your code
-
Just a quick suggestion, to make the "topic solved" button a little more noticeable. Most users that just join the forums have no clue where it is when they are asked to please mark the thread as solved...Thank you
-
fugix it works! thanks for all your help! and thanks PaulRayn for correcting my mistakes, much appreciated! im trying to work on silly part
glad I could help, if you have any more problems we'll be here!
-
yeah, use this
<?php if (isset($_REQUEST['submit'])) { $date1= $_POST['day'] . "-" . $_POST['month'] . "-" . $_POST['year']; $sql = "INSERT INTO $db_table(Country,Nationality,Province,DATE1) values ('".mysql_real_escape_string(stripslashes($_REQUEST['Country']))."','".mysql_real_escape_string(stripslashes($_REQUEST['Nationality']))."','".mysql_real_escape_string(stripslashes($_REQUEST['Province']))."','$date1')"; if($result = mysql_query($sql ,$db)) { echo '<h1>Success!</h1>'; } else { echo "ERROR: ".mysql_error(); } } else ?>
-
Echo your query before you submit it. Plug it into a raw query line (like from the console or PHPMyAdmin) and see what errors are reported.
Chances are there is a problem with your query.
this is already implemented in her code
-
im not fully following, please explain what you would like to accomplish further. Are you able to write to the file now?
-
your $date1 variable is what needs to be inserted into your db..not sure why that code is at the bottom, it needs to be before your insert and the $DATE1 var is to be inserted
-
if the column_is set to DATE, then you will need to insert it into the db using the format "yyyy-mm-dd"
-
sounds like a permissions problem, try this
$myFile = $_POST['sitename']; $fh = fopen($myFile, 'w') or die("can't open file"); $chmod = chmod($fh, 0777); $stringData = "test\n"; fwrite($fh, $stringData); $stringData = "test\n"; fwrite($fh, $stringData); fclose($fh);
-
what is the format for the column "DATE1", meaning do you have it set as date, varchar, etc...
I'm new to PHP-please help with my code!
in PHP Coding Help
Posted
im not sure that i follow your logic for doing this...but try this