Jump to content

tapos

Members
  • Posts

    145
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://tapos.wordpress.com

Profile Information

  • Gender
    Not Telling

tapos's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. u can use following: <?php $months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); $curr_month = date ('F'); ?> <form name="pickmonth" method="post" action="../schedules/editmonth.php"> <select name = "which_month" > <option value = "" >Select Month <?php foreach($months as $month){ $selected = ($month == $curr_month) ? 'selected="selected"' : ''; echo '<option '.$selected.' value = "'.$month.'" >'.$month.'</option>'; } ?> </select> <input type="submit" value="Submit month" /> </form>
  2. u can use xpath functions. see here http://www.php.net/manual-lookup.php?pattern=xpath
  3. use $_POST instead of HTTP_POST_VARS
  4. Also one more thing should be hope this will solve your problem
  5. i didn't see any object. You can't use $this variable without object
  6. $sql = "SELECT * FROM $table_name WHERE username = '$_POST[user_name]' AND password = password('$_POST[user_password]')"; $result =@mysql_query($sql,$connection) or die(mysql_error()); $user_info = mysql_fetch_array($result); now in the div tag <div id="ProfileContainer"> <div id="mainProfile"> <div id="profilePhoto">Users Photography: <img src='/photography/<?php echo $user_info['photoUrlText']?>'></div> <div id="nameContainer"><?php echo $user_info['username']?></div> <div id="bDayContainer">Users Birthdate:<?php echo $user_info['birthday']?></div> <div id="profileBody"></div> </div> hope this will help u
  7. use bellow $link = mysql_connect('mysql400.ixwebhosting.com', 'my_user', 'my_password); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_select_db('my_database') or die('couldn't select db'.mysql_error); echo '<br>DB Selected successfully'; $res=mysql_query('select * from students'); $cnt=mysql_num_rows($res); echo "<br> COUNT : ".$cnt; ?> if you still getting same then there is no record in the database in the students table. Please check the students table again
  8. use max() and min(). for further info http://www.php.net/manual/en/function.max.php http://www.php.net/manual/en/function.min.php
  9. change this to bellow $query = "SELECT password FROM 'Accounts' WHERE email = '$email'";
  10. May be the package id didn't sent to paypal, so that when the page return from paypal, u didn't get the package
  11. U have synaptic package manager to do this. BTW if u can't install php and mysql in Ubuntu use XAMPP for linux. Its easy to install (BTW i don't recommend this if u are using any linux OS)
  12. yes, save the variable names and the values in the database, this will make simple what u want to to.
  13. try to debug like bellow $result = mysql_query($query) or die('SQL error'); i think this is database connection problem that why $result variable doesn't contain any resource identifier, mysql_query() return a false
×
×
  • 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.