I have a website (bootleg/css) I put together. I am currently implementing user registration but I am having troubles determining the best way to go about the following:
I have users that will be entering their teammates, and themselves into a tournament (via a form). That's the easy part. Once the users have input their info, I'd like the webpage to populate with the registered team in a designated area. The structure as so:
(Registration form)
TEAM NAME
Member 1
Member 2
Member 3
Member 4
I want it to take TEAM NAME and display it in a specific section of a webpage for those registered. Like so:
(Displayed as so)
REGISTERED TEAMS:
Slayers
Dominatrix
Evolution
I am most familiar with css and html, but I am willing to work with php as long as it can be injected into the current site. I have a MySQL server setup and can edit it further. I've done a LOT on the design side, but not too much on the scripting side until recently so go easy on me.
You can do this by simply using PHP and MySQL.As you said,you are familiar with MySQL,I would give you the outline to do this.
Make a table for the registered users,Insert data to MySQL Database using INSERT Query in MySQL.
INSERT INTO Table_name (id,member_name,member_age,...) VALUE ('','$name','$age',...)
You can select all the values using SELECT Query from Database Table,and echo it on HTML part,where you want to show the result.
SELECT * FROM Table_name
Related
I have the following scenario:
My website db has a system table called "Companies", which includes an id field, companyName field, and companyImageUrl field.
How do I set up an umbraco document type for adding entries to this table ?
Maybe I shouldn't use a custom table at all ?
Thanks.
As far as I know, Umbraco doesn't support what you want to do out of the box (mapping a document type to a table that isn't part of the umbraco core).
One approach that might work is to create an action handler that syncs a Company doc type to your table when creating a node of that type.
It's a bit of a hack though. I've found that I've very rarely needed to create custom tables. What exactly are you trying to do with it? My guess is that you don't really need it and would be better off working with a doc type instead. Umbraco provides a variety of ways to get and act upon doc types from within custom C# code (check out the umbraco.NodeFactory namespace). You'll also get the added benefit of being able to easily interact with these nodes from XSLT/Razor.
Does anyone have some code or a link as to how to create the user login name as a parameter during a sql query in ASP.NET?
Basically I want to use the default membership structure with a new field ClubID, then I want to add a new table called aspnet_Clubs which contains things such as Club Name, stadium name, Balance etc etc... and then use a relationship between ClubID and a field in the aspnet_Clubs table to tie things together.
Then when each user logs in they should see the clubs information specific to their loginID.
I know the syntax to use for the query, its getting the loginname parameter and being able to use/assign it as part of the search that is causing me the problem.
In general it is not recommended to break the default schema of the aspnetdb where the Membership data is stored. It can bring you to unexpected consequences in the future.
I had a similar question a couple of days ago, please check it here, may be you will be able to adopt something from the discussion to your situation.
I've installed CRM 2011 to see if I can tailor it to our business. We do repairs, I want to be able to book in a contact (client) and then a case and have the clients number and address print on the case form. All I can find are fields relevant to the case and not client, any idea on how I can select them?
To get fields from the contact onto the case form you could -
Create redundant fields on the case form for the fields that you want to port over from the contact, and then edit the mappings of the relationship from Contact to Case to map those fields to the case.
Create a web application that loads contact data and then add it to an iframe on the case form. Make it so that the web application accepts the case id in the query string of the URL so that it can look up the related contact and load its details within the web app.
Add JScript (or HTML resource in 2011) to the case form to load the contact values on the fly. You will have to use SOAP XML (or REST endpoints in 2011) messages to pull the data from the CRM service and then can inject it into the CRM case form's DOM.
Option 1 is the quickest solution but will not be realtime (only comes over when the case is first created and must be related to the contact on creation. Option 1 also adds some database redundancy.
Option 2 is the most supported realtime solution, but also requires the most work.
Option 3 is easier than option 2, but any DOM injection will likely not be supported for future releases.
EDIT
To use the mapping option, go to Settings > Customization > "Customize the System". Expand the Case item in the left hand navigation. Then click on N:1 relationships and open the relationship "incident_customer_contacts". This relationship connects the contact to its cases.
On the relationship window click on "Mappings" in the left hand navigation. This controls what fields are mapped from the case when it is created.
Click new and select the contact field from the left that you want to map to the case on the right. Repeat this for each field that you want mapped. Note that the fields need to be the same types, and if they are option sets, they will have to have the same underlying integer values for each of their options.
Now when you create a new case from a contact (or set the contact during the create), the fields should map onto the case.
Seeing as how Craig mentioned he's using CRM 2011, I felt I'd clarify that for Option 3 of Cole's suggestion, you can also use SOAP Xml against the Organization Service, or just use the REST endpoint and both will be supported. So long as you utilize CRM's Xrm.Page object to display the data on the form and don't do any other DOM manipulation, you should be fully supported.
Another Option, "Option 2b" we'll call it would be to add fields to the form for the data you want to be loaded, then add a plugin registered to the Retrieve of the case entity that would populate those fields on the fly for you. No redundancy other than the fields on the form at that point.
I would personally recommend Option 2b if possible because there will not be any lag in loading the data onto the form, and it provides for minimal data redundancy, minimal service calls, and the least amount of additional customizations.
My option is a lot easy one. All we are doing is using Dialog to create cases and in the dialog fields you can get contact detail dynamically. At the end of the form when you create new case, use this dynamic values to submit in Case form.
We get times when customer tell us that the phone number is changed since last time and this method gives you option to change customer's details on the fly and submit both in Contact Entity and Case entity at the same time.
I am using two content types company and Employee . I am using node reference here(Company -> Employee). Within the Company form , the Employee node comes as a popup ,Employee form need to bring the display and functionality to the company form and should keep the node reference. .
Unfortunately, embedding one form in another is nearly impossible in Drupal. That is due to its form-handling and node-handling system.
If you want such relationships, you often need to write a simple, small module that maintains relationships in the database, offers forms to insert/update them and ways to extend nodes with your relational behaviour.
Best I could suggest is an iFrame holding the employee form - but still it's not very elegant.
In an ASP.NET WebForms application I would like to allow the end-user to browse selected raw data in an sql-server database.
However, I would like to restrict access for the user to only view some of the data based on the username.
I'm not sure how to do this in a way that is possible for the user to understand, since SQL is not necessarily known to the user.
What options do I have here?
As a basis for this I have considered creating one sql function per table in question. That function should return the data that the user is allowed to view, e.g.,
CREATE FUNCTION ufn_RawData_Employee(#username nvarchar(256))
RETURNS TABLE
AS ( SELECT * FROM Employee
WHERE [#username is allowed to view the given Employee] )
In a webpage the end-user might then type an SQL-like statement like
SELECT Name, HireDate FROM ((Employee))
where (([TableName])) then could be replaced by ufn_RawData_[TableName]([UserName]) before calling the database.
(For security reasons such calls could then be performed by a sql user whose only permissions are SELECT permissions to these functions.)
However, this approach might be too difficult for the end-user. I would like to know if an easier/user-friendlier solution exists for the end-user to browse selected raw data?
If you are only showing the user data from one table, or one view (which would probably be more useful) then yes you could store the name of that view in a table and retrieve it with a function. You could then display the data in pages, and make sure your standard select scripts have a built in search function if necessary.
There is no need for the user to write SQL if they are only getting data from one table or view. If you need to provide multiple potential tables/ views, then let them choose from a drop down, but it doesn't sound worthwhile to allow them to write their own SQL queries.