NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page [resolved] Getting info to pre populate?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-29-2006, 02:24 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Dec 2005
Posts: 208
JsteRmX is an unknown quantity at this point
 



Getting info to pre populate?


Hey, here is the website I am working on so that you can see what I am asking

http://domains.jesslester.com

What I want to happen, is when someone clicks on Make Offer, I want the corresponding domain name to automatically fill in where the person would enter the domain they are making an offer on. I want this to automatically populate. I know i could just create a different page for each domain, but I really rather not since I would have to make a new one for each domain.

Is this possible?

Thanks
__________________
+ Domains I have for sale here
JsteRmX is offline  
Old 10-29-2006, 03:37 AM   #2 (permalink)
Senior Member
 
Hitch's Avatar
Join Date: Aug 2005
Location: Uk, South Yorkshire
Posts: 1,225
Hitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to behold
 


Winner
PHP Programming - May 2007
Animal Rescue Third World Education Find Marrow Donors!
Ok, do something like this.

For your link, on the homepage, have
HTML Code:
/makeoffer.php?name=$domainvar
Remember, change $domainvar to your variable for the names.
Eg, $domains['name'], or whatever you use

Then, on makeoffer.php, add into your PHP page.
PHP Code:
Then, in your form, on makeoffer.php, on the name textbox, set the value to $domain_name.

Replace:
HTML Code:
 <input name="domain" type="text" size="20" maxlength="255" />
with
HTML Code:
 <input name="domain" type="text" value="$domain_name" size="20" maxlength="255" />
Done. It should work

If you want some help, just PM me.

Adrian
__________________
Cueburst - Support System - FAQ Knowledge Base, Tickets and more.
Last edited by Hitch; 10-29-2006 at 10:44 AM.
Hitch is offline  
Old 10-31-2006, 06:03 PM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Dec 2005
Posts: 208
JsteRmX is an unknown quantity at this point
 



hmm well this doesnt work. you can check the site again to see what happens now. I only tried this out on the first domain name in the list.

What I see in the text box now is $domain_name

I think the problem is that I never set the variables for all the domains. How would I go about doing this?
__________________
+ Domains I have for sale here
JsteRmX is offline  
Old 10-31-2006, 06:08 PM   #4 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
You need to replace $domainvar with the actual variable name of your "domain var" and use PHP to echo it into the URL. We can't know what the variable actually is without seeing your code.
Dan is offline  
Old 10-31-2006, 07:31 PM THREAD STARTER               #5 (permalink)
NamePros Regular
Join Date: Dec 2005
Posts: 208
JsteRmX is an unknown quantity at this point
 



well i dont have a variable for them, that i know of?

here is some of the code so you can see.

makeoffer.php (this is not complete code, just the important parts. It would be way to long to post the whole file)

PHP Code:
<?php
$domain_name 
$_GET['name'];
?>

<form id="form1" name="form1" method="post" action="makeoffercode.php">
        <label><span class="style21">Domain Name:
        <input name="domain" type="text" value="$domain_name" size="20" maxlength="255" />
          </span></label>
        <p class="style21">Offer Amount: 
          <label>
          <input name="offer" type="text" value="$" size="10" maxlength="255" />
          </label>
        </p>
        <p align="left" class="style2 style1 style21">Your Email Address:
            <input name="emailfrom" type="text" size="20" maxlength="255" />
        </p>
        <p align="left" class="style2 style1 style21">Your Name:
            <input name="name" type="text" size="20" maxlength="255" />
        </p>
        <p align="left" class="style2 style1 style21">Other Message:</p>
        <p align="left" class="style2 style1 style21"><span class="style21">
          <label>
            <textarea name="message" cols="40" rows="4"></textarea>
            </label>
          </span></p>
        <p>
          <label>
          <input type="submit" name="Submit" value="Submit" />
          </label>
        </p>
        <p>&nbsp;</p>
      </form>
index.php (again, just the important parts)
PHP Code:
    <table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC">
????: NamePros.com http://www.namepros.com/showthread.php?t=252070
      <
tr bgcolor="#DBDBDB">
        <
td width="20%" height="24" bgcolor="#D6E6F8"><span class="style19">AgeiaPhysxCard.com</span></td>
        <
td width="20%" bgcolor="#D6E6F8"><div align="center" class="style19">07/24/07</div></td>
        <
td width="20%" bgcolor="#D6E6F8"><div align="center" class="style19"><a href="http://www.sedo.com/search/details.php4?domain=ageiaphysxcard.com&amp;tracked=&amp;partnerid=&amp;language=us" target="_blank">Make Offer at Sedo </a></div></td>
????: NamePros.com http://www.namepros.com/showthread.php?t=252070
        <
td width="20%" bgcolor="#D6E6F8"><div align="center" class="style19"><a href="https://www.afternic.com/name.php?id=13777812">Make Offer at Afternic</a> </div></td>
        <
td width="20%" valign="middle" bgcolor="#D6E6F8"><form action="" method="post" name="offer1" class="style19" id="offer1">
          <
div align="center"><a href="http://domains.jesslester.com/makeoffer.php?name=$domainvar">Make Offer</a>          </div>
        </
form></td
and that pretty much just repeats for every domain name listed in the table.

Please let me know if you need to see more.

Thanks for all the help.

I am sure this would have been much easier to make using MySQL. perhaps i should i consider redoing the whole thing.
__________________
+ Domains I have for sale here
JsteRmX is offline  
Old 10-31-2006, 08:31 PM   #6 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
If you have each separate thing like that, you will have to change $domainvar to the domain yourself (for each one).
Dan is offline  
Old 11-01-2006, 08:43 PM THREAD STARTER               #7 (permalink)
NamePros Regular
Join Date: Dec 2005
Posts: 208
JsteRmX is an unknown quantity at this point
 



after trying many different things, i still am not able to get this to work.

In the link I changed the $domainvar to the actual Domain Name, but this didnt seem to work.

Not sure what is wrong

thanks for the help though.
__________________
+ Domains I have for sale here
JsteRmX is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 10:05 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger