thanks
Anyway, I solve t this way:
Using this function after the insertion to the database
[PHP] header("Locatio n: http//notsamepage.php ");[/PHP]
User Profile
Collapse
-
submiting form to same page, and jumping to another
I have a form that submits the form values to the same page (of the form). The database is feed from the same page that have the form in it.
So the action attribute would look like this
[PHP]<form action="samepag e.php"[/PHP]
Right now, after submiting, the same form opens, so the user dont know if his record was submited.
Saying this.
How can I do to: after sumniting the form,... -
No problems with the disappearing text, it works like it was.
Anyway, thanks for the advice for the second problem! (you don't sound like a newbie)...Leave a comment:
-
I tried shortening the text in the comment area tu just "ingresa" (no capital letters, no spaces) and I figured out a code that do the job:
[code=php]
if($_POST['comentario'] == "ingresa%")
{
$_POST['comentario'] = "";
}
[/code]
but when putting a long text in the comment area (as I need to), the if condition doesnt work, or doesent make...Leave a comment:
-
ok, but hoe should I insert that mysql statement into my page code? I tried with:
mysql>.........
mysql = ......
sql =.......
but now success.
thanks...Leave a comment:
-
Yes, indeed I tried a lot of time to do it but I am a newbie in this and could not code it correctly in my dreamweaver code edit I now the code should be something like this (for example)
SELECT DATE_FORMAT(fec ha, '%W %M %Y');
but don't know how to open a mysql code in dreamweaver code editor for this pourpuse....Leave a comment:
-
-
Dreamweaver help: using PHP/MySQL formatting date
hello,
On a dynamic html page I have a table with a date column
[code=html]<td><?php echo $row_resultado_ viajes['fecha']; ?> </td>[/code]
I want the date to be displayed in other format so I am using the date function
[code=html]<td><?php echo date("j-m-Y",$row_resulta do_viajes['fecha']); ?> </td>[/code]
but... -
-
Ok thanks a lot, it works now. This is the code I use:
[code=mysql]"SELECT * FROM viajes WHERE viajes.fecha BETWEEN '". $_GET['orderdate'] ."' AND DATE_ADD('". $_GET['orderdate'] ."',INTERVAL '". $_GET['rango'] ."' day)";[/code]
Could you tell me why I had to use the DATE_ADD instead of the DATEADD function? I think I am lost in between SQL and MYSQL...Leave a comment:
-
adding dates, DATEADD function
Hello,
I have one form with a field for entering a date 'orderdate' and another field for entering a days interval 'range'.
This form is used to preform a query on a travel tickets database, so that I can search for tickets with dates from ('orderdate') till ('orderdate' + 'range').
For achieving this I have the followiong code:
[php]
"SELECT * FROM viajes WHERE viajes.fecha BETWEEN DATEADD(Day,'".... -
I will try to order things up a little to make things clear about this post an its progress
1)Time type field cant store a null value, instead it stores 00:00:00 value.
2)I have a time form that gives the user the choice of "I am not sure of the time yet".
3)A code on the query could display an empty value when it found a 00:00:00 value stored in the database
4)By doing this, if...Leave a comment:
-
I have coded exactly what you told me but nothing happens, still storing the initial text. Also tried using { } for the if instruction, using "nul", using 'null' ect. but nothing seems to work. Also I tried deliting the word "aquí" from the text to avoid problems generated by the accent (í). but nothing seems to work....Leave a comment:
-
coding an if condition
Hello,
On a html form I have a text area where user can post comment.
There is an initial value with indications for the user to read, but when he clicks on the field the comment dissapears letting him write his own comment.
This field is enabled to receive a null value, and that is what I want to happen when the user doesn't write on it. But right now if the user don't write on it, it is storing the initial value... -
sorry if this questions are to basic:
I have just talk about one time field, so what would be field1 and field2 in your code?
How do I insert that code in phpMyadmin for example, I bet it is not a query
I haven't been able to store a null value on the field to make true the if condition, but I want to try it anyway if you could answer this maybe dumb questions.
Thanks in advance...Leave a comment:
-
I have set the default to NULL and the column to accept null values, still storing 00:00:00. As the Mysql guide says a Time field cant store a null value, but their must be some coding to be done for solving this problem....Leave a comment:
-
Sure, all ready done that and still getting 00:00:00. Thats the problem...Leave a comment:
-
Correct, but when inserting a null value I get 00:00:00 stored....Leave a comment:
-
Ok, I have make the colum accept NULL values, and then?
There must be some way for achieving this(not storing, but dislaying a null value for a Time datatype when the user has fill in a time form with ¨no time fot this trip¨ for example)...Leave a comment:
-
inserting a null value to Time type
Hello,
I have a Time type column on a table. I have set it to ¨no null¨. When I enter a null value the column stores a 00:00:00 value.
How can I do to store just an empty value, so that the user have the choice to don't enter any time and display no time when the record is displayed?
Actually, the important part for me is displaying no value, I really don't mind what it is stored, but I dont want to loose the...
No activity results to display
Show More
Leave a comment: