User Profile

Collapse

Profile Sidebar

Collapse
rodrigo21
rodrigo21
Last Activity: May 30 '08, 06:10 PM
Joined: Mar 14 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • thanks
    Anyway, I solve t this way:
    Using this function after the insertion to the database

    [PHP] header("Locatio n: http//notsamepage.php ");[/PHP]
    See more | Go to post

    Leave a comment:


  • rodrigo21
    started a topic submiting form to same page, and jumping to another
    in PHP

    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,...
    See more | Go to post

  • rodrigo21
    replied to coding an if condition
    in PHP
    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)...
    See more | Go to post

    Leave a comment:


  • rodrigo21
    replied to coding an if condition
    in PHP
    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...
    See more | Go to post

    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...
    See more | Go to post

    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....
    See more | Go to post

    Leave a comment:


  • Thanks ronverdonk! it works fine now :)...
    See more | Go to post

    Leave a comment:


  • rodrigo21
    started a topic Dreamweaver help: using PHP/MySQL formatting date
    in PHP

    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']; ?>&nbsp; </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']); ?>&nbsp; </td>[/code]

    but...
    See more | Go to post

  • rodrigo21
    replied to inserting a null value to Time type
    I am sorry, I apologize
    See more | Go to post

    Leave a comment:


  • rodrigo21
    replied to adding dates, DATEADD function
    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...
    See more | Go to post

    Leave a comment:


  • rodrigo21
    started a topic adding dates, DATEADD function

    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,'"....
    See more | Go to post
    Last edited by ronverdonk; Mar 29 '08, 11:44 AM. Reason: code tags

  • rodrigo21
    replied to inserting a null value to Time type
    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...
    See more | Go to post

    Leave a comment:


  • rodrigo21
    replied to coding an if condition
    in PHP
    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....
    See more | Go to post

    Leave a comment:


  • rodrigo21
    started a topic coding an if condition
    in PHP

    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...
    See more | Go to post
    Last edited by ronverdonk; Mar 15 '08, 12:01 AM. Reason: code tags!!!

  • rodrigo21
    replied to inserting a null value to Time type
    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...
    See more | Go to post

    Leave a comment:


  • rodrigo21
    replied to inserting a null value to Time type
    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....
    See more | Go to post

    Leave a comment:


  • rodrigo21
    replied to inserting a null value to Time type
    Sure, all ready done that and still getting 00:00:00. Thats the problem...
    See more | Go to post

    Leave a comment:


  • rodrigo21
    replied to inserting a null value to Time type
    Correct, but when inserting a null value I get 00:00:00 stored....
    See more | Go to post

    Leave a comment:


  • rodrigo21
    replied to inserting a null value to Time type
    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)...
    See more | Go to post

    Leave a comment:


  • rodrigo21
    started a topic inserting a null value to Time type

    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...
    See more | Go to post
No activity results to display
Show More
Working...