Jump to content

niza

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

niza's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am trying to setup a cron job for my website, after this tutorial: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Type crontab -e Ok now type 'i' and input something similar to: 30 * * * * /home/virtual/site/fst/var/www/html/cron.php. Now push Escape then type :wq (it tells it to write the changes and then quit). It should say 'installing new crontab'. [/quote] I did all of this,the message"installing new crontab" showed up but for some reason it does not work. Anyone has any ideas? Do I need to put a code in my script cron.php? Thanks
  2. I am trying calculate a date that occurs in the future. The date is stored in my database in date(""Y-m-d") format. I am not sure if I can make calculations with this format, so my question is how can I transform a date from date() format to time() format?
  3. Don't worry about it. I solved my problem. Thanks anyway.
  4. I have a user registration area: new_member.php - script that executes the registration new_member.htm - contains the html registration form template.htm - html template If the user does not fill in all the required fields, new_member.htm is called in new_member.php, with the appropiate error message. Now, I have problems including my template.htm file. 1.If I include it in the new_member.htm, whenever the user does not fill in the required fileds, the error message are displayed on top of the template. 2.If I include it in the new_member.php, the form is not displayed properly. Any ideas? By the way, the script for user registration I am using is this: [a href=\"http://www.phpfreaks.com/tutorials/40/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/40/0.php[/a]
  5. Never mind. The variables were not being passes. I used this to get the variables: $adName = $_POST['adName']; $adInfo = $_POST['adInfo']; And now it works. Is there any way I can get the variables through a loop or something rather then manually give each variable a value?
  6. I found the problem and I've fixed it. Now it updates the database but with nothing. I have no values in the database, only empty fields.
  7. [code]$connection = mysql_connect($host, $user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $sql = "UPDATE ad SET adName='$adName', adInfo='$adInfo', adPrice='$adPrice' WHERE adID='21'"; $result = mysql_query($sql) or die("Couldn't modify database."); mysql_close($connection); [/code] This is the error I get: Couldn't modify database. Anyone knows what is happening and why I cannot update the database? I checked all tables in the database for spelling mistakes and the variables. But I found no mistakes.
  8. Here's my code: [code]echo "<table cellspacing='10' border='0' cellpadding='0' width='100%'>"; echo "<tr><td width='20'></td> <td>Ad Name</td></tr>"; while ($row = mysql_fetch_array($result,MYSQL_ASSOC))   { extract($row); echo "<tr><td>[b]<input name='vAd' type='radio' value='$adID'>[/b]</td> <td>{$row['adName']}</td></tr>"; } echo "<tr><td colspan='2' width='10'> <table cellspacing='10' border='0' cellpadding='0' width='100%'> <tr><td>[b]<a href='edit_add.php?id=$adID'>[/b]Edit</a></td></tr></table> </td></tr></table>";        [/code] I would like to pass the value $adID from the radio buttons [code]<input name='vAd' type='radio' value='$adID'>[/code] to this link here: [code]<a href='edit_add.php?id=$adID'>Edit</a>[/code] But no matter what radio button I choose, when I click the Edit link, the ID doesn't change. Any sugestions? Thanks.
  9. Hi everybody. I am building a webpage with cell phone and accessories ads. Basically when someone wants to sell his/her cell phone will post an ad on my webpage. I want to create a list/menu with the 3 categories (phones, accessories, cards), and pass the 3 values to category.php page. Here's the code for the list/menu so far which is contained in the choose.php file: echo "<select name='category'>\n"; echo "<option name='category' value='phones'>Phones</option>\n"; echo "<option name='category' value='accessories'>Accessories</option>\n"; echo "<option name='category' value='cards'>Cards</option>\n"; echo "</select>"; The query for the category.php page looks like this: $query = "SELECT * FROM ad WHERE (and I want the value passed from the list/menu in here)" I would also like to mention that the list/menu should have a onChange auction (I do not want a submit button) and it should take you to category.php page(this is also the page where the values should be passed to). Thank you in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.